increase 1.303.0 → 1.305.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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/increase/client.rb +7 -15
  5. data/lib/increase/models/card_push_transfer.rb +3 -0
  6. data/lib/increase/models/card_token_capabilities.rb +3 -0
  7. data/lib/increase/models/card_validation.rb +3 -0
  8. data/lib/increase/models/check_deposit.rb +7 -6
  9. data/lib/increase/models/inbound_mail_item.rb +22 -7
  10. data/lib/increase/models/inbound_mail_item_list_params.rb +13 -5
  11. data/lib/increase/models/lockbox_address.rb +162 -0
  12. data/lib/increase/models/lockbox_address_create_params.rb +22 -0
  13. data/lib/increase/models/{lockbox_list_params.rb → lockbox_address_list_params.rb} +8 -16
  14. data/lib/increase/models/lockbox_address_retrieve_params.rb +22 -0
  15. data/lib/increase/models/lockbox_address_update_params.rb +55 -0
  16. data/lib/increase/models/lockbox_recipient.rb +135 -0
  17. data/lib/increase/models/lockbox_recipient_create_params.rb +49 -0
  18. data/lib/increase/models/lockbox_recipient_list_params.rb +110 -0
  19. data/lib/increase/models/lockbox_recipient_retrieve_params.rb +22 -0
  20. data/lib/increase/models/lockbox_recipient_update_params.rb +63 -0
  21. data/lib/increase/models/simulations/card_token_create_params.rb +3 -0
  22. data/lib/increase/models/simulations/inbound_mail_item_create_params.rb +17 -9
  23. data/lib/increase/models.rb +15 -31
  24. data/lib/increase/resources/inbound_mail_items.rb +4 -2
  25. data/lib/increase/resources/lockbox_addresses.rb +115 -0
  26. data/lib/increase/resources/lockbox_recipients.rb +130 -0
  27. data/lib/increase/resources/simulations/inbound_mail_items.rb +5 -3
  28. data/lib/increase/version.rb +1 -1
  29. data/lib/increase.rb +12 -22
  30. data/rbi/increase/client.rbi +5 -11
  31. data/rbi/increase/models/card_push_transfer.rbi +3 -0
  32. data/rbi/increase/models/card_token_capabilities.rbi +7 -0
  33. data/rbi/increase/models/card_validation.rbi +3 -0
  34. data/rbi/increase/models/check_deposit.rbi +10 -8
  35. data/rbi/increase/models/inbound_mail_item.rbi +32 -9
  36. data/rbi/increase/models/inbound_mail_item_list_params.rbi +19 -8
  37. data/rbi/increase/models/lockbox_address.rbi +228 -0
  38. data/rbi/increase/models/lockbox_address_create_params.rbi +46 -0
  39. data/rbi/increase/models/{lockbox_list_params.rbi → lockbox_address_list_params.rbi} +9 -18
  40. data/rbi/increase/models/{bookkeeping_entry_set_retrieve_params.rbi → lockbox_address_retrieve_params.rbi} +8 -8
  41. data/rbi/increase/models/lockbox_address_update_params.rbi +116 -0
  42. data/rbi/increase/models/lockbox_recipient.rbi +182 -0
  43. data/rbi/increase/models/{lockbox_create_params.rbi → lockbox_recipient_create_params.rbi} +19 -8
  44. data/rbi/increase/models/lockbox_recipient_list_params.rbi +190 -0
  45. data/rbi/increase/models/{bookkeeping_entry_retrieve_params.rbi → lockbox_recipient_retrieve_params.rbi} +8 -8
  46. data/rbi/increase/models/lockbox_recipient_update_params.rbi +129 -0
  47. data/rbi/increase/models/simulations/card_token_create_params.rbi +7 -0
  48. data/rbi/increase/models/simulations/inbound_mail_item_create_params.rbi +22 -8
  49. data/rbi/increase/models.rbi +16 -38
  50. data/rbi/increase/resources/inbound_mail_items.rbi +6 -3
  51. data/rbi/increase/resources/{bookkeeping_entry_sets.rbi → lockbox_addresses.rbi} +35 -24
  52. data/rbi/increase/resources/{lockboxes.rbi → lockbox_recipients.rbi} +31 -26
  53. data/rbi/increase/resources/simulations/inbound_mail_items.rbi +6 -3
  54. data/sig/increase/client.rbs +3 -7
  55. data/sig/increase/models/card_push_transfer.rbs +4 -1
  56. data/sig/increase/models/card_token_capabilities.rbs +4 -1
  57. data/sig/increase/models/card_validation.rbs +4 -1
  58. data/sig/increase/models/check_deposit.rbs +4 -4
  59. data/sig/increase/models/inbound_mail_item.rbs +20 -5
  60. data/sig/increase/models/inbound_mail_item_list_params.rbs +12 -5
  61. data/sig/increase/models/lockbox_address.rbs +117 -0
  62. data/sig/increase/models/{lockbox_retrieve_params.rbs → lockbox_address_create_params.rbs} +8 -6
  63. data/sig/increase/models/{lockbox_list_params.rbs → lockbox_address_list_params.rbs} +8 -15
  64. data/sig/increase/models/{bookkeeping_entry_set_retrieve_params.rbs → lockbox_address_retrieve_params.rbs} +6 -6
  65. data/sig/increase/models/lockbox_address_update_params.rbs +59 -0
  66. data/sig/increase/models/lockbox_recipient.rbs +92 -0
  67. data/sig/increase/models/{lockbox_create_params.rbs → lockbox_recipient_create_params.rbs} +12 -3
  68. data/sig/increase/models/lockbox_recipient_list_params.rbs +100 -0
  69. data/sig/increase/models/{bookkeeping_entry_retrieve_params.rbs → lockbox_recipient_retrieve_params.rbs} +6 -6
  70. data/sig/increase/models/lockbox_recipient_update_params.rbs +66 -0
  71. data/sig/increase/models/simulations/card_token_create_params.rbs +4 -1
  72. data/sig/increase/models/simulations/inbound_mail_item_create_params.rbs +18 -5
  73. data/sig/increase/models.rbs +15 -31
  74. data/sig/increase/resources/inbound_mail_items.rbs +2 -1
  75. data/sig/increase/resources/lockbox_addresses.rbs +32 -0
  76. data/sig/increase/resources/{lockboxes.rbs → lockbox_recipients.rbs} +11 -9
  77. data/sig/increase/resources/simulations/inbound_mail_items.rbs +2 -1
  78. metadata +38 -68
  79. data/lib/increase/models/bookkeeping_account.rb +0 -104
  80. data/lib/increase/models/bookkeeping_account_balance_params.rb +0 -30
  81. data/lib/increase/models/bookkeeping_account_create_params.rb +0 -60
  82. data/lib/increase/models/bookkeeping_account_list_params.rb +0 -45
  83. data/lib/increase/models/bookkeeping_account_update_params.rb +0 -30
  84. data/lib/increase/models/bookkeeping_balance_lookup.rb +0 -54
  85. data/lib/increase/models/bookkeeping_entry.rb +0 -79
  86. data/lib/increase/models/bookkeeping_entry_list_params.rb +0 -42
  87. data/lib/increase/models/bookkeeping_entry_retrieve_params.rb +0 -22
  88. data/lib/increase/models/bookkeeping_entry_set.rb +0 -116
  89. data/lib/increase/models/bookkeeping_entry_set_create_params.rb +0 -67
  90. data/lib/increase/models/bookkeeping_entry_set_list_params.rb +0 -53
  91. data/lib/increase/models/bookkeeping_entry_set_retrieve_params.rb +0 -22
  92. data/lib/increase/models/lockbox.rb +0 -185
  93. data/lib/increase/models/lockbox_create_params.rb +0 -38
  94. data/lib/increase/models/lockbox_retrieve_params.rb +0 -22
  95. data/lib/increase/models/lockbox_update_params.rb +0 -63
  96. data/lib/increase/resources/bookkeeping_accounts.rb +0 -122
  97. data/lib/increase/resources/bookkeeping_entries.rb +0 -65
  98. data/lib/increase/resources/bookkeeping_entry_sets.rb +0 -96
  99. data/lib/increase/resources/lockboxes.rb +0 -123
  100. data/rbi/increase/models/bookkeeping_account.rbi +0 -165
  101. data/rbi/increase/models/bookkeeping_account_balance_params.rbi +0 -57
  102. data/rbi/increase/models/bookkeeping_account_create_params.rbi +0 -130
  103. data/rbi/increase/models/bookkeeping_account_list_params.rbi +0 -79
  104. data/rbi/increase/models/bookkeeping_account_update_params.rbi +0 -54
  105. data/rbi/increase/models/bookkeeping_balance_lookup.rbi +0 -85
  106. data/rbi/increase/models/bookkeeping_entry.rbi +0 -108
  107. data/rbi/increase/models/bookkeeping_entry_list_params.rbi +0 -73
  108. data/rbi/increase/models/bookkeeping_entry_set.rbi +0 -162
  109. data/rbi/increase/models/bookkeeping_entry_set_create_params.rbi +0 -110
  110. data/rbi/increase/models/bookkeeping_entry_set_list_params.rbi +0 -90
  111. data/rbi/increase/models/lockbox.rbi +0 -251
  112. data/rbi/increase/models/lockbox_retrieve_params.rbi +0 -40
  113. data/rbi/increase/models/lockbox_update_params.rbi +0 -131
  114. data/rbi/increase/resources/bookkeeping_accounts.rbi +0 -94
  115. data/rbi/increase/resources/bookkeeping_entries.rbi +0 -47
  116. data/sig/increase/models/bookkeeping_account.rbs +0 -74
  117. data/sig/increase/models/bookkeeping_account_balance_params.rbs +0 -30
  118. data/sig/increase/models/bookkeeping_account_create_params.rbs +0 -63
  119. data/sig/increase/models/bookkeeping_account_list_params.rbs +0 -38
  120. data/sig/increase/models/bookkeeping_account_update_params.rbs +0 -28
  121. data/sig/increase/models/bookkeeping_balance_lookup.rbs +0 -40
  122. data/sig/increase/models/bookkeeping_entry.rbs +0 -55
  123. data/sig/increase/models/bookkeeping_entry_list_params.rbs +0 -38
  124. data/sig/increase/models/bookkeeping_entry_set.rbs +0 -78
  125. data/sig/increase/models/bookkeeping_entry_set_create_params.rbs +0 -52
  126. data/sig/increase/models/bookkeeping_entry_set_list_params.rbs +0 -49
  127. data/sig/increase/models/lockbox.rbs +0 -129
  128. data/sig/increase/models/lockbox_update_params.rbs +0 -66
  129. data/sig/increase/resources/bookkeeping_accounts.rbs +0 -34
  130. data/sig/increase/resources/bookkeeping_entries.rbs +0 -19
  131. data/sig/increase/resources/bookkeeping_entry_sets.rbs +0 -27
@@ -1,79 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingAccountListParams < 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(
12
- Increase::BookkeepingAccountListParams,
13
- Increase::Internal::AnyHash
14
- )
15
- end
16
-
17
- # Return the page of entries after this one.
18
- sig { returns(T.nilable(String)) }
19
- attr_reader :cursor
20
-
21
- sig { params(cursor: String).void }
22
- attr_writer :cursor
23
-
24
- # Filter records to the one with the specified `idempotency_key` you chose for
25
- # that object. This value is unique across Increase and is used to ensure that a
26
- # request is only processed once. Learn more about
27
- # [idempotency](https://increase.com/documentation/idempotency-keys).
28
- sig { returns(T.nilable(String)) }
29
- attr_reader :idempotency_key
30
-
31
- sig { params(idempotency_key: String).void }
32
- attr_writer :idempotency_key
33
-
34
- # Limit the size of the list that is returned. The default (and maximum) is 100
35
- # objects.
36
- sig { returns(T.nilable(Integer)) }
37
- attr_reader :limit
38
-
39
- sig { params(limit: Integer).void }
40
- attr_writer :limit
41
-
42
- sig do
43
- params(
44
- cursor: String,
45
- idempotency_key: String,
46
- limit: Integer,
47
- request_options: Increase::RequestOptions::OrHash
48
- ).returns(T.attached_class)
49
- end
50
- def self.new(
51
- # Return the page of entries after this one.
52
- cursor: nil,
53
- # Filter records to the one with the specified `idempotency_key` you chose for
54
- # that object. This value is unique across Increase and is used to ensure that a
55
- # request is only processed once. Learn more about
56
- # [idempotency](https://increase.com/documentation/idempotency-keys).
57
- idempotency_key: nil,
58
- # Limit the size of the list that is returned. The default (and maximum) is 100
59
- # objects.
60
- limit: nil,
61
- request_options: {}
62
- )
63
- end
64
-
65
- sig do
66
- override.returns(
67
- {
68
- cursor: String,
69
- idempotency_key: String,
70
- limit: Integer,
71
- request_options: Increase::RequestOptions
72
- }
73
- )
74
- end
75
- def to_hash
76
- end
77
- end
78
- end
79
- end
@@ -1,54 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingAccountUpdateParams < 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(
12
- Increase::BookkeepingAccountUpdateParams,
13
- Increase::Internal::AnyHash
14
- )
15
- end
16
-
17
- # The bookkeeping account you would like to update.
18
- sig { returns(String) }
19
- attr_accessor :bookkeeping_account_id
20
-
21
- # The name you choose for the account.
22
- sig { returns(String) }
23
- attr_accessor :name
24
-
25
- sig do
26
- params(
27
- bookkeeping_account_id: String,
28
- name: String,
29
- request_options: Increase::RequestOptions::OrHash
30
- ).returns(T.attached_class)
31
- end
32
- def self.new(
33
- # The bookkeeping account you would like to update.
34
- bookkeeping_account_id:,
35
- # The name you choose for the account.
36
- name:,
37
- request_options: {}
38
- )
39
- end
40
-
41
- sig do
42
- override.returns(
43
- {
44
- bookkeeping_account_id: String,
45
- name: String,
46
- request_options: Increase::RequestOptions
47
- }
48
- )
49
- end
50
- def to_hash
51
- end
52
- end
53
- end
54
- end
@@ -1,85 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingBalanceLookup < Increase::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Increase::BookkeepingBalanceLookup, Increase::Internal::AnyHash)
9
- end
10
-
11
- # The Bookkeeping Account's current balance, representing the sum of all
12
- # Bookkeeping Entries on the Bookkeeping Account.
13
- sig { returns(Integer) }
14
- attr_accessor :balance
15
-
16
- # The identifier for the account for which the balance was queried.
17
- sig { returns(String) }
18
- attr_accessor :bookkeeping_account_id
19
-
20
- # A constant representing the object's type. For this resource it will always be
21
- # `bookkeeping_balance_lookup`.
22
- sig { returns(Increase::BookkeepingBalanceLookup::Type::TaggedSymbol) }
23
- attr_accessor :type
24
-
25
- # Represents a request to lookup the balance of a Bookkeeping Account at a given
26
- # point in time.
27
- sig do
28
- params(
29
- balance: Integer,
30
- bookkeeping_account_id: String,
31
- type: Increase::BookkeepingBalanceLookup::Type::OrSymbol
32
- ).returns(T.attached_class)
33
- end
34
- def self.new(
35
- # The Bookkeeping Account's current balance, representing the sum of all
36
- # Bookkeeping Entries on the Bookkeeping Account.
37
- balance:,
38
- # The identifier for the account for which the balance was queried.
39
- bookkeeping_account_id:,
40
- # A constant representing the object's type. For this resource it will always be
41
- # `bookkeeping_balance_lookup`.
42
- type:
43
- )
44
- end
45
-
46
- sig do
47
- override.returns(
48
- {
49
- balance: Integer,
50
- bookkeeping_account_id: String,
51
- type: Increase::BookkeepingBalanceLookup::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
- # `bookkeeping_balance_lookup`.
60
- module Type
61
- extend Increase::Internal::Type::Enum
62
-
63
- TaggedSymbol =
64
- T.type_alias do
65
- T.all(Symbol, Increase::BookkeepingBalanceLookup::Type)
66
- end
67
- OrSymbol = T.type_alias { T.any(Symbol, String) }
68
-
69
- BOOKKEEPING_BALANCE_LOOKUP =
70
- T.let(
71
- :bookkeeping_balance_lookup,
72
- Increase::BookkeepingBalanceLookup::Type::TaggedSymbol
73
- )
74
-
75
- sig do
76
- override.returns(
77
- T::Array[Increase::BookkeepingBalanceLookup::Type::TaggedSymbol]
78
- )
79
- end
80
- def self.values
81
- end
82
- end
83
- end
84
- end
85
- end
@@ -1,108 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingEntry < Increase::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Increase::BookkeepingEntry, Increase::Internal::AnyHash)
9
- end
10
-
11
- # The entry identifier.
12
- sig { returns(String) }
13
- attr_accessor :id
14
-
15
- # The identifier for the Account the Entry belongs to.
16
- sig { returns(String) }
17
- attr_accessor :account_id
18
-
19
- # The Entry amount in the minor unit of its currency. For dollars, for example,
20
- # this is cents.
21
- sig { returns(Integer) }
22
- attr_accessor :amount
23
-
24
- # When the entry set was created.
25
- sig { returns(Time) }
26
- attr_accessor :created_at
27
-
28
- # The identifier for the Entry Set the Entry belongs to.
29
- sig { returns(String) }
30
- attr_accessor :entry_set_id
31
-
32
- # A constant representing the object's type. For this resource it will always be
33
- # `bookkeeping_entry`.
34
- sig { returns(Increase::BookkeepingEntry::Type::TaggedSymbol) }
35
- attr_accessor :type
36
-
37
- # Entries are T-account entries recording debits and credits. Your compliance
38
- # setup might require annotating money movements using this API. Learn more in our
39
- # [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping).
40
- sig do
41
- params(
42
- id: String,
43
- account_id: String,
44
- amount: Integer,
45
- created_at: Time,
46
- entry_set_id: String,
47
- type: Increase::BookkeepingEntry::Type::OrSymbol
48
- ).returns(T.attached_class)
49
- end
50
- def self.new(
51
- # The entry identifier.
52
- id:,
53
- # The identifier for the Account the Entry belongs to.
54
- account_id:,
55
- # The Entry amount in the minor unit of its currency. For dollars, for example,
56
- # this is cents.
57
- amount:,
58
- # When the entry set was created.
59
- created_at:,
60
- # The identifier for the Entry Set the Entry belongs to.
61
- entry_set_id:,
62
- # A constant representing the object's type. For this resource it will always be
63
- # `bookkeeping_entry`.
64
- type:
65
- )
66
- end
67
-
68
- sig do
69
- override.returns(
70
- {
71
- id: String,
72
- account_id: String,
73
- amount: Integer,
74
- created_at: Time,
75
- entry_set_id: String,
76
- type: Increase::BookkeepingEntry::Type::TaggedSymbol
77
- }
78
- )
79
- end
80
- def to_hash
81
- end
82
-
83
- # A constant representing the object's type. For this resource it will always be
84
- # `bookkeeping_entry`.
85
- module Type
86
- extend Increase::Internal::Type::Enum
87
-
88
- TaggedSymbol =
89
- T.type_alias { T.all(Symbol, Increase::BookkeepingEntry::Type) }
90
- OrSymbol = T.type_alias { T.any(Symbol, String) }
91
-
92
- BOOKKEEPING_ENTRY =
93
- T.let(
94
- :bookkeeping_entry,
95
- Increase::BookkeepingEntry::Type::TaggedSymbol
96
- )
97
-
98
- sig do
99
- override.returns(
100
- T::Array[Increase::BookkeepingEntry::Type::TaggedSymbol]
101
- )
102
- end
103
- def self.values
104
- end
105
- end
106
- end
107
- end
108
- end
@@ -1,73 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingEntryListParams < 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(
12
- Increase::BookkeepingEntryListParams,
13
- Increase::Internal::AnyHash
14
- )
15
- end
16
-
17
- # The identifier for the Bookkeeping Account to filter by.
18
- sig { returns(T.nilable(String)) }
19
- attr_reader :account_id
20
-
21
- sig { params(account_id: String).void }
22
- attr_writer :account_id
23
-
24
- # Return the page of entries after this one.
25
- sig { returns(T.nilable(String)) }
26
- attr_reader :cursor
27
-
28
- sig { params(cursor: String).void }
29
- attr_writer :cursor
30
-
31
- # Limit the size of the list that is returned. The default (and maximum) is 100
32
- # objects.
33
- sig { returns(T.nilable(Integer)) }
34
- attr_reader :limit
35
-
36
- sig { params(limit: Integer).void }
37
- attr_writer :limit
38
-
39
- sig do
40
- params(
41
- account_id: String,
42
- cursor: String,
43
- limit: Integer,
44
- request_options: Increase::RequestOptions::OrHash
45
- ).returns(T.attached_class)
46
- end
47
- def self.new(
48
- # The identifier for the Bookkeeping Account to filter by.
49
- account_id: nil,
50
- # Return the page of entries after this one.
51
- cursor: nil,
52
- # Limit the size of the list that is returned. The default (and maximum) is 100
53
- # objects.
54
- limit: nil,
55
- request_options: {}
56
- )
57
- end
58
-
59
- sig do
60
- override.returns(
61
- {
62
- account_id: String,
63
- cursor: String,
64
- limit: Integer,
65
- request_options: Increase::RequestOptions
66
- }
67
- )
68
- end
69
- def to_hash
70
- end
71
- end
72
- end
73
- end
@@ -1,162 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingEntrySet < Increase::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Increase::BookkeepingEntrySet, Increase::Internal::AnyHash)
9
- end
10
-
11
- # The entry set identifier.
12
- sig { returns(String) }
13
- attr_accessor :id
14
-
15
- # When the entry set was created.
16
- sig { returns(Time) }
17
- attr_accessor :created_at
18
-
19
- # The timestamp of the entry set.
20
- sig { returns(Time) }
21
- attr_accessor :date
22
-
23
- # The entries.
24
- sig { returns(T::Array[Increase::BookkeepingEntrySet::Entry]) }
25
- attr_accessor :entries
26
-
27
- # The idempotency key you chose for this object. This value is unique across
28
- # Increase and is used to ensure that a request is only processed once. Learn more
29
- # about [idempotency](https://increase.com/documentation/idempotency-keys).
30
- sig { returns(T.nilable(String)) }
31
- attr_accessor :idempotency_key
32
-
33
- # The transaction identifier, if any.
34
- sig { returns(T.nilable(String)) }
35
- attr_accessor :transaction_id
36
-
37
- # A constant representing the object's type. For this resource it will always be
38
- # `bookkeeping_entry_set`.
39
- sig { returns(Increase::BookkeepingEntrySet::Type::TaggedSymbol) }
40
- attr_accessor :type
41
-
42
- # Entry Sets are accounting entries that are transactionally applied. Your
43
- # compliance setup might require annotating money movements using this API. Learn
44
- # more in our
45
- # [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping).
46
- sig do
47
- params(
48
- id: String,
49
- created_at: Time,
50
- date: Time,
51
- entries: T::Array[Increase::BookkeepingEntrySet::Entry::OrHash],
52
- idempotency_key: T.nilable(String),
53
- transaction_id: T.nilable(String),
54
- type: Increase::BookkeepingEntrySet::Type::OrSymbol
55
- ).returns(T.attached_class)
56
- end
57
- def self.new(
58
- # The entry set identifier.
59
- id:,
60
- # When the entry set was created.
61
- created_at:,
62
- # The timestamp of the entry set.
63
- date:,
64
- # The entries.
65
- entries:,
66
- # The idempotency key you chose for this object. This value is unique across
67
- # Increase and is used to ensure that a request is only processed once. Learn more
68
- # about [idempotency](https://increase.com/documentation/idempotency-keys).
69
- idempotency_key:,
70
- # The transaction identifier, if any.
71
- transaction_id:,
72
- # A constant representing the object's type. For this resource it will always be
73
- # `bookkeeping_entry_set`.
74
- type:
75
- )
76
- end
77
-
78
- sig do
79
- override.returns(
80
- {
81
- id: String,
82
- created_at: Time,
83
- date: Time,
84
- entries: T::Array[Increase::BookkeepingEntrySet::Entry],
85
- idempotency_key: T.nilable(String),
86
- transaction_id: T.nilable(String),
87
- type: Increase::BookkeepingEntrySet::Type::TaggedSymbol
88
- }
89
- )
90
- end
91
- def to_hash
92
- end
93
-
94
- class Entry < Increase::Internal::Type::BaseModel
95
- OrHash =
96
- T.type_alias do
97
- T.any(
98
- Increase::BookkeepingEntrySet::Entry,
99
- Increase::Internal::AnyHash
100
- )
101
- end
102
-
103
- # The entry identifier.
104
- sig { returns(String) }
105
- attr_accessor :id
106
-
107
- # The bookkeeping account impacted by the entry.
108
- sig { returns(String) }
109
- attr_accessor :account_id
110
-
111
- # The amount of the entry in minor units.
112
- sig { returns(Integer) }
113
- attr_accessor :amount
114
-
115
- sig do
116
- params(id: String, account_id: String, amount: Integer).returns(
117
- T.attached_class
118
- )
119
- end
120
- def self.new(
121
- # The entry identifier.
122
- id:,
123
- # The bookkeeping account impacted by the entry.
124
- account_id:,
125
- # The amount of the entry in minor units.
126
- amount:
127
- )
128
- end
129
-
130
- sig do
131
- override.returns({ id: String, account_id: String, amount: Integer })
132
- end
133
- def to_hash
134
- end
135
- end
136
-
137
- # A constant representing the object's type. For this resource it will always be
138
- # `bookkeeping_entry_set`.
139
- module Type
140
- extend Increase::Internal::Type::Enum
141
-
142
- TaggedSymbol =
143
- T.type_alias { T.all(Symbol, Increase::BookkeepingEntrySet::Type) }
144
- OrSymbol = T.type_alias { T.any(Symbol, String) }
145
-
146
- BOOKKEEPING_ENTRY_SET =
147
- T.let(
148
- :bookkeeping_entry_set,
149
- Increase::BookkeepingEntrySet::Type::TaggedSymbol
150
- )
151
-
152
- sig do
153
- override.returns(
154
- T::Array[Increase::BookkeepingEntrySet::Type::TaggedSymbol]
155
- )
156
- end
157
- def self.values
158
- end
159
- end
160
- end
161
- end
162
- end
@@ -1,110 +0,0 @@
1
- # typed: strong
2
-
3
- module Increase
4
- module Models
5
- class BookkeepingEntrySetCreateParams < 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(
12
- Increase::BookkeepingEntrySetCreateParams,
13
- Increase::Internal::AnyHash
14
- )
15
- end
16
-
17
- # The bookkeeping entries.
18
- sig do
19
- returns(T::Array[Increase::BookkeepingEntrySetCreateParams::Entry])
20
- end
21
- attr_accessor :entries
22
-
23
- # The date of the transaction. Optional if `transaction_id` is provided, in which
24
- # case we use the `date` of that transaction. Required otherwise.
25
- sig { returns(T.nilable(Time)) }
26
- attr_reader :date
27
-
28
- sig { params(date: Time).void }
29
- attr_writer :date
30
-
31
- # The identifier of the Transaction related to this entry set, if any.
32
- sig { returns(T.nilable(String)) }
33
- attr_reader :transaction_id
34
-
35
- sig { params(transaction_id: String).void }
36
- attr_writer :transaction_id
37
-
38
- sig do
39
- params(
40
- entries:
41
- T::Array[Increase::BookkeepingEntrySetCreateParams::Entry::OrHash],
42
- date: Time,
43
- transaction_id: String,
44
- request_options: Increase::RequestOptions::OrHash
45
- ).returns(T.attached_class)
46
- end
47
- def self.new(
48
- # The bookkeeping entries.
49
- entries:,
50
- # The date of the transaction. Optional if `transaction_id` is provided, in which
51
- # case we use the `date` of that transaction. Required otherwise.
52
- date: nil,
53
- # The identifier of the Transaction related to this entry set, if any.
54
- transaction_id: nil,
55
- request_options: {}
56
- )
57
- end
58
-
59
- sig do
60
- override.returns(
61
- {
62
- entries: T::Array[Increase::BookkeepingEntrySetCreateParams::Entry],
63
- date: Time,
64
- transaction_id: String,
65
- request_options: Increase::RequestOptions
66
- }
67
- )
68
- end
69
- def to_hash
70
- end
71
-
72
- class Entry < Increase::Internal::Type::BaseModel
73
- OrHash =
74
- T.type_alias do
75
- T.any(
76
- Increase::BookkeepingEntrySetCreateParams::Entry,
77
- Increase::Internal::AnyHash
78
- )
79
- end
80
-
81
- # The identifier for the Bookkeeping Account impacted by this entry.
82
- sig { returns(String) }
83
- attr_accessor :account_id
84
-
85
- # The entry amount in the minor unit of the account currency. For dollars, for
86
- # example, this is cents. Debit entries have positive amounts; credit entries have
87
- # negative amounts.
88
- sig { returns(Integer) }
89
- attr_accessor :amount
90
-
91
- sig do
92
- params(account_id: String, amount: Integer).returns(T.attached_class)
93
- end
94
- def self.new(
95
- # The identifier for the Bookkeeping Account impacted by this entry.
96
- account_id:,
97
- # The entry amount in the minor unit of the account currency. For dollars, for
98
- # example, this is cents. Debit entries have positive amounts; credit entries have
99
- # negative amounts.
100
- amount:
101
- )
102
- end
103
-
104
- sig { override.returns({ account_id: String, amount: Integer }) }
105
- def to_hash
106
- end
107
- end
108
- end
109
- end
110
- end