orb-billing 1.60.0 → 1.61.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 (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +4 -0
  5. data/lib/orb/models/account/billing_entity.rb +214 -0
  6. data/lib/orb/models/account/billing_entity_archive_by_external_id_params.rb +22 -0
  7. data/lib/orb/models/account/billing_entity_archive_params.rb +22 -0
  8. data/lib/orb/models/account/billing_entity_create_params.rb +117 -0
  9. data/lib/orb/models/account/billing_entity_fetch_by_external_id_params.rb +22 -0
  10. data/lib/orb/models/account/billing_entity_fetch_params.rb +22 -0
  11. data/lib/orb/models/account/billing_entity_list_params.rb +55 -0
  12. data/lib/orb/models/account/billing_entity_unarchive_by_external_id_params.rb +22 -0
  13. data/lib/orb/models/account/billing_entity_unarchive_params.rb +22 -0
  14. data/lib/orb/models/account/billing_entity_update_by_external_id_params.rb +177 -0
  15. data/lib/orb/models/account/billing_entity_update_params.rb +179 -0
  16. data/lib/orb/models/account/payment_gateway_connection.rb +75 -0
  17. data/lib/orb/models/account/payment_gateway_connection_fetch_params.rb +22 -0
  18. data/lib/orb/models/account/payment_gateway_connection_list_params.rb +65 -0
  19. data/lib/orb/models/customers/customer_payment_gateway_connection.rb +89 -0
  20. data/lib/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rb +53 -0
  21. data/lib/orb/models/customers/payment_gateway_connection_create_params.rb +52 -0
  22. data/lib/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rb +28 -0
  23. data/lib/orb/models/customers/payment_gateway_connection_delete_params.rb +28 -0
  24. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rb +39 -0
  25. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rb +25 -0
  26. data/lib/orb/models/customers/payment_gateway_connection_list_params.rb +39 -0
  27. data/lib/orb/models/customers/payment_gateway_connection_list_response.rb +25 -0
  28. data/lib/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rb +68 -0
  29. data/lib/orb/models/customers/payment_gateway_connection_update_params.rb +67 -0
  30. data/lib/orb/models.rb +2 -0
  31. data/lib/orb/resources/account/billing_entities.rb +321 -0
  32. data/lib/orb/resources/account/payment_gateway_connections.rb +71 -0
  33. data/lib/orb/resources/account.rb +26 -0
  34. data/lib/orb/resources/customers/payment_gateway_connections.rb +310 -0
  35. data/lib/orb/resources/customers.rb +22 -0
  36. data/lib/orb/version.rb +1 -1
  37. data/lib/orb.rb +29 -0
  38. data/rbi/orb/client.rbi +3 -0
  39. data/rbi/orb/models/account/billing_entity.rbi +342 -0
  40. data/rbi/orb/models/account/billing_entity_archive_by_external_id_params.rbi +43 -0
  41. data/rbi/orb/models/account/billing_entity_archive_params.rbi +40 -0
  42. data/rbi/orb/models/account/billing_entity_create_params.rbi +208 -0
  43. data/rbi/orb/models/account/billing_entity_fetch_by_external_id_params.rbi +43 -0
  44. data/rbi/orb/models/account/billing_entity_fetch_params.rbi +40 -0
  45. data/rbi/orb/models/account/billing_entity_list_params.rbi +108 -0
  46. data/rbi/orb/models/account/billing_entity_unarchive_by_external_id_params.rbi +43 -0
  47. data/rbi/orb/models/account/billing_entity_unarchive_params.rbi +40 -0
  48. data/rbi/orb/models/account/billing_entity_update_by_external_id_params.rbi +335 -0
  49. data/rbi/orb/models/account/billing_entity_update_params.rbi +331 -0
  50. data/rbi/orb/models/account/payment_gateway_connection.rbi +125 -0
  51. data/rbi/orb/models/account/payment_gateway_connection_fetch_params.rbi +43 -0
  52. data/rbi/orb/models/account/payment_gateway_connection_list_params.rbi +124 -0
  53. data/rbi/orb/models/customers/customer_payment_gateway_connection.rbi +139 -0
  54. data/rbi/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbi +77 -0
  55. data/rbi/orb/models/customers/payment_gateway_connection_create_params.rbi +77 -0
  56. data/rbi/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbi +52 -0
  57. data/rbi/orb/models/customers/payment_gateway_connection_delete_params.rbi +52 -0
  58. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbi +62 -0
  59. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbi +47 -0
  60. data/rbi/orb/models/customers/payment_gateway_connection_list_params.rbi +62 -0
  61. data/rbi/orb/models/customers/payment_gateway_connection_list_response.rbi +47 -0
  62. data/rbi/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbi +120 -0
  63. data/rbi/orb/models/customers/payment_gateway_connection_update_params.rbi +120 -0
  64. data/rbi/orb/models.rbi +2 -0
  65. data/rbi/orb/resources/account/billing_entities.rbi +289 -0
  66. data/rbi/orb/resources/account/payment_gateway_connections.rbi +54 -0
  67. data/rbi/orb/resources/account.rbi +22 -0
  68. data/rbi/orb/resources/customers/payment_gateway_connections.rbi +234 -0
  69. data/rbi/orb/resources/customers.rbi +21 -0
  70. data/sig/orb/client.rbs +2 -0
  71. data/sig/orb/models/account/billing_entity.rbs +155 -0
  72. data/sig/orb/models/account/billing_entity_archive_by_external_id_params.rbs +26 -0
  73. data/sig/orb/models/account/billing_entity_archive_params.rbs +25 -0
  74. data/sig/orb/models/account/billing_entity_create_params.rbs +86 -0
  75. data/sig/orb/models/account/billing_entity_fetch_by_external_id_params.rbs +26 -0
  76. data/sig/orb/models/account/billing_entity_fetch_params.rbs +25 -0
  77. data/sig/orb/models/account/billing_entity_list_params.rbs +51 -0
  78. data/sig/orb/models/account/billing_entity_unarchive_by_external_id_params.rbs +26 -0
  79. data/sig/orb/models/account/billing_entity_unarchive_params.rbs +25 -0
  80. data/sig/orb/models/account/billing_entity_update_by_external_id_params.rbs +125 -0
  81. data/sig/orb/models/account/billing_entity_update_params.rbs +125 -0
  82. data/sig/orb/models/account/payment_gateway_connection.rbs +58 -0
  83. data/sig/orb/models/account/payment_gateway_connection_fetch_params.rbs +26 -0
  84. data/sig/orb/models/account/payment_gateway_connection_list_params.rbs +56 -0
  85. data/sig/orb/models/customers/customer_payment_gateway_connection.rbs +65 -0
  86. data/sig/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbs +45 -0
  87. data/sig/orb/models/customers/payment_gateway_connection_create_params.rbs +45 -0
  88. data/sig/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbs +30 -0
  89. data/sig/orb/models/customers/payment_gateway_connection_delete_params.rbs +30 -0
  90. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbs +38 -0
  91. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbs +27 -0
  92. data/sig/orb/models/customers/payment_gateway_connection_list_params.rbs +38 -0
  93. data/sig/orb/models/customers/payment_gateway_connection_list_response.rbs +27 -0
  94. data/sig/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbs +53 -0
  95. data/sig/orb/models/customers/payment_gateway_connection_update_params.rbs +53 -0
  96. data/sig/orb/models.rbs +2 -0
  97. data/sig/orb/resources/account/billing_entities.rbs +80 -0
  98. data/sig/orb/resources/account/payment_gateway_connections.rbs +22 -0
  99. data/sig/orb/resources/account.rbs +11 -0
  100. data/sig/orb/resources/customers/payment_gateway_connections.rbs +67 -0
  101. data/sig/orb/resources/customers.rbs +2 -0
  102. metadata +88 -1
@@ -0,0 +1,310 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Resources
5
+ class Customers
6
+ # A customer is a buyer of your products, and the other party to the billing
7
+ # relationship.
8
+ #
9
+ # In Orb, customers are assigned system generated identifiers automatically, but
10
+ # it's often desirable to have these match existing identifiers in your system. To
11
+ # avoid having to denormalize Orb ID information, you can pass in an
12
+ # `external_customer_id` with your own identifier. See
13
+ # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
14
+ # information about how these aliases work in Orb.
15
+ #
16
+ # In addition to having an identifier in your system, a customer may exist in a
17
+ # payment provider solution like Stripe. Use the `payment_provider_id` and the
18
+ # `payment_provider` enum field to express this mapping.
19
+ #
20
+ # A customer also has a timezone (from the standard
21
+ # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
22
+ # your account's timezone. See [Timezone localization](/essentials/timezones) for
23
+ # information on what this timezone parameter influences within Orb.
24
+ class PaymentGatewayConnections
25
+ # Some parameter documentations has been truncated, see
26
+ # {Orb::Models::Customers::PaymentGatewayConnectionCreateParams} for more details.
27
+ #
28
+ # This endpoint maps the customer to a payment gateway connection. Orb charges the
29
+ # customer for a billing entity's invoices through the customer's first mapping
30
+ # for that billing entity; `is_default` moves that to this mapping when the
31
+ # customer already has one.
32
+ #
33
+ # @overload create(customer_id, payment_gateway_connection_id:, is_default: nil, provider_customer_id: nil, request_options: {})
34
+ #
35
+ # @param customer_id [String]
36
+ #
37
+ # @param payment_gateway_connection_id [String] The ID of the payment gateway connection to map the customer to.
38
+ #
39
+ # @param is_default [Boolean] Whether Orb charges the customer for the billing entity's invoices through this
40
+ #
41
+ # @param provider_customer_id [String, nil] The ID of the customer in the external payment provider.
42
+ #
43
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
44
+ #
45
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
46
+ #
47
+ # @see Orb::Models::Customers::PaymentGatewayConnectionCreateParams
48
+ def create(customer_id, params)
49
+ parsed, options = Orb::Customers::PaymentGatewayConnectionCreateParams.dump_request(params)
50
+ @client.request(
51
+ method: :post,
52
+ path: ["customers/%1$s/payment_gateway_connections", customer_id],
53
+ body: parsed,
54
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
55
+ options: options
56
+ )
57
+ end
58
+
59
+ # Some parameter documentations has been truncated, see
60
+ # {Orb::Models::Customers::PaymentGatewayConnectionUpdateParams} for more details.
61
+ #
62
+ # This endpoint updates the customer's mapping to a payment gateway connection:
63
+ # the customer's ID in that account, and whether Orb charges the customer for the
64
+ # billing entity's invoices through it. Omitted fields keep their value.
65
+ #
66
+ # @overload update(payment_gateway_connection_id, customer_id:, is_default: nil, provider_customer_id: nil, request_options: {})
67
+ #
68
+ # @param payment_gateway_connection_id [String] Path param
69
+ #
70
+ # @param customer_id [String] Path param
71
+ #
72
+ # @param is_default [Boolean, Orb::Models::Customers::PaymentGatewayConnectionUpdateParams::IsDefault, nil] Body param: Only `true` is accepted: it makes this the customer's default mappin
73
+ #
74
+ # @param provider_customer_id [String, nil] Body param: The ID of the customer in the external payment provider. Omit it to
75
+ #
76
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
77
+ #
78
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
79
+ #
80
+ # @see Orb::Models::Customers::PaymentGatewayConnectionUpdateParams
81
+ def update(payment_gateway_connection_id, params)
82
+ parsed, options = Orb::Customers::PaymentGatewayConnectionUpdateParams.dump_request(params)
83
+ customer_id =
84
+ parsed.delete(:customer_id) do
85
+ raise ArgumentError.new("missing required path argument #{_1}")
86
+ end
87
+ @client.request(
88
+ method: :put,
89
+ path: [
90
+ "customers/%1$s/payment_gateway_connections/%2$s",
91
+ customer_id,
92
+ payment_gateway_connection_id
93
+ ],
94
+ body: parsed,
95
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
96
+ options: options
97
+ )
98
+ end
99
+
100
+ # This endpoint returns the customer's mappings to payment gateway connections,
101
+ # for example the customer's Stripe ID in each connected Stripe account. A
102
+ # customer has at most one mapping per connection, so the list is not paginated.
103
+ #
104
+ # @overload list(customer_id, billing_entity_id: nil, payment_gateway_connection_id: nil, request_options: {})
105
+ #
106
+ # @param customer_id [String]
107
+ #
108
+ # @param billing_entity_id [String, nil] Only return mappings to this billing entity's connections.
109
+ #
110
+ # @param payment_gateway_connection_id [String, nil] Only return the mapping to this connection.
111
+ #
112
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
113
+ #
114
+ # @return [Orb::Models::Customers::PaymentGatewayConnectionListResponse]
115
+ #
116
+ # @see Orb::Models::Customers::PaymentGatewayConnectionListParams
117
+ def list(customer_id, params = {})
118
+ parsed, options = Orb::Customers::PaymentGatewayConnectionListParams.dump_request(params)
119
+ query = Orb::Internal::Util.encode_query_params(parsed)
120
+ @client.request(
121
+ method: :get,
122
+ path: ["customers/%1$s/payment_gateway_connections", customer_id],
123
+ query: query,
124
+ model: Orb::Models::Customers::PaymentGatewayConnectionListResponse,
125
+ options: options
126
+ )
127
+ end
128
+
129
+ # This endpoint removes the customer's mapping to a payment gateway connection and
130
+ # returns it. Active subscriptions and unpaid invoices do not block it. If the
131
+ # mapping was the customer's default for the billing entity, the customer's oldest
132
+ # remaining mapping on that entity becomes the default. With no mapping left, the
133
+ # next charge goes through the billing entity's default connection.
134
+ #
135
+ # @overload delete(payment_gateway_connection_id, customer_id:, request_options: {})
136
+ #
137
+ # @param payment_gateway_connection_id [String]
138
+ # @param customer_id [String]
139
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
140
+ #
141
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
142
+ #
143
+ # @see Orb::Models::Customers::PaymentGatewayConnectionDeleteParams
144
+ def delete(payment_gateway_connection_id, params)
145
+ parsed, options = Orb::Customers::PaymentGatewayConnectionDeleteParams.dump_request(params)
146
+ customer_id =
147
+ parsed.delete(:customer_id) do
148
+ raise ArgumentError.new("missing required path argument #{_1}")
149
+ end
150
+ @client.request(
151
+ method: :delete,
152
+ path: [
153
+ "customers/%1$s/payment_gateway_connections/%2$s",
154
+ customer_id,
155
+ payment_gateway_connection_id
156
+ ],
157
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
158
+ options: options
159
+ )
160
+ end
161
+
162
+ # Some parameter documentations has been truncated, see
163
+ # {Orb::Models::Customers::PaymentGatewayConnectionCreateByExternalIDParams} for
164
+ # more details.
165
+ #
166
+ # This endpoint maps the customer to a payment gateway connection. Orb charges the
167
+ # customer for a billing entity's invoices through the customer's first mapping
168
+ # for that billing entity; `is_default` moves that to this mapping when the
169
+ # customer already has one.
170
+ #
171
+ # @overload create_by_external_id(external_customer_id, payment_gateway_connection_id:, is_default: nil, provider_customer_id: nil, request_options: {})
172
+ #
173
+ # @param external_customer_id [String]
174
+ #
175
+ # @param payment_gateway_connection_id [String] The ID of the payment gateway connection to map the customer to.
176
+ #
177
+ # @param is_default [Boolean] Whether Orb charges the customer for the billing entity's invoices through this
178
+ #
179
+ # @param provider_customer_id [String, nil] The ID of the customer in the external payment provider.
180
+ #
181
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
182
+ #
183
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
184
+ #
185
+ # @see Orb::Models::Customers::PaymentGatewayConnectionCreateByExternalIDParams
186
+ def create_by_external_id(external_customer_id, params)
187
+ parsed, options = Orb::Customers::PaymentGatewayConnectionCreateByExternalIDParams.dump_request(params)
188
+ @client.request(
189
+ method: :post,
190
+ path: ["customers/external_customer_id/%1$s/payment_gateway_connections", external_customer_id],
191
+ body: parsed,
192
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
193
+ options: options
194
+ )
195
+ end
196
+
197
+ # This endpoint removes the customer's mapping to a payment gateway connection and
198
+ # returns it. Active subscriptions and unpaid invoices do not block it. If the
199
+ # mapping was the customer's default for the billing entity, the customer's oldest
200
+ # remaining mapping on that entity becomes the default. With no mapping left, the
201
+ # next charge goes through the billing entity's default connection.
202
+ #
203
+ # @overload delete_by_external_id(payment_gateway_connection_id, external_customer_id:, request_options: {})
204
+ #
205
+ # @param payment_gateway_connection_id [String]
206
+ # @param external_customer_id [String]
207
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
208
+ #
209
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
210
+ #
211
+ # @see Orb::Models::Customers::PaymentGatewayConnectionDeleteByExternalIDParams
212
+ def delete_by_external_id(payment_gateway_connection_id, params)
213
+ parsed, options = Orb::Customers::PaymentGatewayConnectionDeleteByExternalIDParams.dump_request(params)
214
+ external_customer_id =
215
+ parsed.delete(:external_customer_id) do
216
+ raise ArgumentError.new("missing required path argument #{_1}")
217
+ end
218
+ @client.request(
219
+ method: :delete,
220
+ path: [
221
+ "customers/external_customer_id/%1$s/payment_gateway_connections/%2$s",
222
+ external_customer_id,
223
+ payment_gateway_connection_id
224
+ ],
225
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
226
+ options: options
227
+ )
228
+ end
229
+
230
+ # This endpoint returns the customer's mappings to payment gateway connections,
231
+ # for example the customer's Stripe ID in each connected Stripe account. A
232
+ # customer has at most one mapping per connection, so the list is not paginated.
233
+ #
234
+ # @overload list_by_external_id(external_customer_id, billing_entity_id: nil, payment_gateway_connection_id: nil, request_options: {})
235
+ #
236
+ # @param external_customer_id [String]
237
+ #
238
+ # @param billing_entity_id [String, nil] Only return mappings to this billing entity's connections.
239
+ #
240
+ # @param payment_gateway_connection_id [String, nil] Only return the mapping to this connection.
241
+ #
242
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
243
+ #
244
+ # @return [Orb::Models::Customers::PaymentGatewayConnectionListByExternalIDResponse]
245
+ #
246
+ # @see Orb::Models::Customers::PaymentGatewayConnectionListByExternalIDParams
247
+ def list_by_external_id(external_customer_id, params = {})
248
+ parsed, options = Orb::Customers::PaymentGatewayConnectionListByExternalIDParams.dump_request(params)
249
+ query = Orb::Internal::Util.encode_query_params(parsed)
250
+ @client.request(
251
+ method: :get,
252
+ path: ["customers/external_customer_id/%1$s/payment_gateway_connections", external_customer_id],
253
+ query: query,
254
+ model: Orb::Models::Customers::PaymentGatewayConnectionListByExternalIDResponse,
255
+ options: options
256
+ )
257
+ end
258
+
259
+ # Some parameter documentations has been truncated, see
260
+ # {Orb::Models::Customers::PaymentGatewayConnectionUpdateByExternalIDParams} for
261
+ # more details.
262
+ #
263
+ # This endpoint updates the customer's mapping to a payment gateway connection:
264
+ # the customer's ID in that account, and whether Orb charges the customer for the
265
+ # billing entity's invoices through it. Omitted fields keep their value.
266
+ #
267
+ # @overload update_by_external_id(payment_gateway_connection_id, external_customer_id:, is_default: nil, provider_customer_id: nil, request_options: {})
268
+ #
269
+ # @param payment_gateway_connection_id [String] Path param
270
+ #
271
+ # @param external_customer_id [String] Path param
272
+ #
273
+ # @param is_default [Boolean, Orb::Models::Customers::PaymentGatewayConnectionUpdateByExternalIDParams::IsDefault, nil] Body param: Only `true` is accepted: it makes this the customer's default mappin
274
+ #
275
+ # @param provider_customer_id [String, nil] Body param: The ID of the customer in the external payment provider. Omit it to
276
+ #
277
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
278
+ #
279
+ # @return [Orb::Models::Customers::CustomerPaymentGatewayConnection]
280
+ #
281
+ # @see Orb::Models::Customers::PaymentGatewayConnectionUpdateByExternalIDParams
282
+ def update_by_external_id(payment_gateway_connection_id, params)
283
+ parsed, options = Orb::Customers::PaymentGatewayConnectionUpdateByExternalIDParams.dump_request(params)
284
+ external_customer_id =
285
+ parsed.delete(:external_customer_id) do
286
+ raise ArgumentError.new("missing required path argument #{_1}")
287
+ end
288
+ @client.request(
289
+ method: :put,
290
+ path: [
291
+ "customers/external_customer_id/%1$s/payment_gateway_connections/%2$s",
292
+ external_customer_id,
293
+ payment_gateway_connection_id
294
+ ],
295
+ body: parsed,
296
+ model: Orb::Customers::CustomerPaymentGatewayConnection,
297
+ options: options
298
+ )
299
+ end
300
+
301
+ # @api private
302
+ #
303
+ # @param client [Orb::Client]
304
+ def initialize(client:)
305
+ @client = client
306
+ end
307
+ end
308
+ end
309
+ end
310
+ end
@@ -68,6 +68,27 @@ module Orb
68
68
  # @return [Orb::Resources::Customers::BalanceTransactions]
69
69
  attr_reader :balance_transactions
70
70
 
71
+ # A customer is a buyer of your products, and the other party to the billing
72
+ # relationship.
73
+ #
74
+ # In Orb, customers are assigned system generated identifiers automatically, but
75
+ # it's often desirable to have these match existing identifiers in your system. To
76
+ # avoid having to denormalize Orb ID information, you can pass in an
77
+ # `external_customer_id` with your own identifier. See
78
+ # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
79
+ # information about how these aliases work in Orb.
80
+ #
81
+ # In addition to having an identifier in your system, a customer may exist in a
82
+ # payment provider solution like Stripe. Use the `payment_provider_id` and the
83
+ # `payment_provider` enum field to express this mapping.
84
+ #
85
+ # A customer also has a timezone (from the standard
86
+ # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
87
+ # your account's timezone. See [Timezone localization](/essentials/timezones) for
88
+ # information on what this timezone parameter influences within Orb.
89
+ # @return [Orb::Resources::Customers::PaymentGatewayConnections]
90
+ attr_reader :payment_gateway_connections
91
+
71
92
  # Some parameter documentations has been truncated, see
72
93
  # {Orb::Models::CustomerCreateParams} for more details.
73
94
  #
@@ -535,6 +556,7 @@ module Orb
535
556
  @costs = Orb::Resources::Customers::Costs.new(client: client)
536
557
  @credits = Orb::Resources::Customers::Credits.new(client: client)
537
558
  @balance_transactions = Orb::Resources::Customers::BalanceTransactions.new(client: client)
559
+ @payment_gateway_connections = Orb::Resources::Customers::PaymentGatewayConnections.new(client: client)
538
560
  end
539
561
  end
540
562
  end
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "1.60.0"
4
+ VERSION = "1.61.0"
5
5
  end
data/lib/orb.rb CHANGED
@@ -53,6 +53,20 @@ require_relative "orb/internal/transport/base_client"
53
53
  require_relative "orb/internal/transport/pooled_net_requester"
54
54
  require_relative "orb/client"
55
55
  require_relative "orb/internal/page"
56
+ require_relative "orb/models/account/billing_entity"
57
+ require_relative "orb/models/account/billing_entity_archive_by_external_id_params"
58
+ require_relative "orb/models/account/billing_entity_archive_params"
59
+ require_relative "orb/models/account/billing_entity_create_params"
60
+ require_relative "orb/models/account/billing_entity_fetch_by_external_id_params"
61
+ require_relative "orb/models/account/billing_entity_fetch_params"
62
+ require_relative "orb/models/account/billing_entity_list_params"
63
+ require_relative "orb/models/account/billing_entity_unarchive_by_external_id_params"
64
+ require_relative "orb/models/account/billing_entity_unarchive_params"
65
+ require_relative "orb/models/account/billing_entity_update_by_external_id_params"
66
+ require_relative "orb/models/account/billing_entity_update_params"
67
+ require_relative "orb/models/account/payment_gateway_connection"
68
+ require_relative "orb/models/account/payment_gateway_connection_fetch_params"
69
+ require_relative "orb/models/account/payment_gateway_connection_list_params"
56
70
  require_relative "orb/models/accounting_provider_config"
57
71
  require_relative "orb/models/address"
58
72
  require_relative "orb/models/address_input"
@@ -176,6 +190,17 @@ require_relative "orb/models/customers/credits/top_up_list_params"
176
190
  require_relative "orb/models/customers/credits/top_up_list_response"
177
191
  require_relative "orb/models/customers/credits/void_initiated_ledger_entry"
178
192
  require_relative "orb/models/customers/credits/void_ledger_entry"
193
+ require_relative "orb/models/customers/customer_payment_gateway_connection"
194
+ require_relative "orb/models/customers/payment_gateway_connection_create_by_external_id_params"
195
+ require_relative "orb/models/customers/payment_gateway_connection_create_params"
196
+ require_relative "orb/models/customers/payment_gateway_connection_delete_by_external_id_params"
197
+ require_relative "orb/models/customers/payment_gateway_connection_delete_params"
198
+ require_relative "orb/models/customers/payment_gateway_connection_list_by_external_id_params"
199
+ require_relative "orb/models/customers/payment_gateway_connection_list_by_external_id_response"
200
+ require_relative "orb/models/customers/payment_gateway_connection_list_params"
201
+ require_relative "orb/models/customers/payment_gateway_connection_list_response"
202
+ require_relative "orb/models/customers/payment_gateway_connection_update_by_external_id_params"
203
+ require_relative "orb/models/customers/payment_gateway_connection_update_params"
179
204
  require_relative "orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params"
180
205
  require_relative "orb/models/customer_sync_payment_methods_from_gateway_params"
181
206
  require_relative "orb/models/customer_tax_id"
@@ -655,6 +680,9 @@ require_relative "orb/models/webhooks/transaction_accounting_sync_succeeded_stan
655
680
  require_relative "orb/models/webhooks/unwrap_standard_webhook_event"
656
681
  require_relative "orb/models/webhook_unwrap_params"
657
682
  require_relative "orb/models"
683
+ require_relative "orb/resources/account"
684
+ require_relative "orb/resources/account/billing_entities"
685
+ require_relative "orb/resources/account/payment_gateway_connections"
658
686
  require_relative "orb/resources/alerts"
659
687
  require_relative "orb/resources/coupons"
660
688
  require_relative "orb/resources/coupons/subscriptions"
@@ -666,6 +694,7 @@ require_relative "orb/resources/customers/costs"
666
694
  require_relative "orb/resources/customers/credits"
667
695
  require_relative "orb/resources/customers/credits/ledger"
668
696
  require_relative "orb/resources/customers/credits/top_ups"
697
+ require_relative "orb/resources/customers/payment_gateway_connections"
669
698
  require_relative "orb/resources/dimensional_price_groups"
670
699
  require_relative "orb/resources/dimensional_price_groups/external_dimensional_price_group_id"
671
700
  require_relative "orb/resources/dimensional_price_groups/prices"
data/rbi/orb/client.rbi CHANGED
@@ -35,6 +35,9 @@ module Orb
35
35
  sig { returns(Orb::Resources::CreditNotes) }
36
36
  attr_reader :credit_notes
37
37
 
38
+ sig { returns(Orb::Resources::Account) }
39
+ attr_reader :account
40
+
38
41
  # A customer is a buyer of your products, and the other party to the billing
39
42
  # relationship.
40
43
  #