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,177 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ # @see Orb::Resources::Account::BillingEntities#update_by_external_id
7
+ class BillingEntityUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute external_billing_entity_id
12
+ #
13
+ # @return [String]
14
+ required :external_billing_entity_id, String
15
+
16
+ # @!attribute address
17
+ # Replaces the whole address. Omit it to keep the current one.
18
+ #
19
+ # @return [Orb::Models::AddressInput, nil]
20
+ optional :address, -> { Orb::AddressInput }, nil?: true
21
+
22
+ # @!attribute default_payment_gateway_connection_id
23
+ # The ID of the connection Orb charges when the customer is not mapped to any of
24
+ # the billing entity's connections. Required when `payment_gateway_connections`
25
+ # has more than one entry.
26
+ #
27
+ # @return [String, nil]
28
+ optional :default_payment_gateway_connection_id, String, nil?: true
29
+
30
+ # @!attribute invoice_settings
31
+ # The invoice settings to change. Omitted fields keep their value; null clears a
32
+ # field so it inherits the account's setting.
33
+ #
34
+ # @return [Orb::Models::Account::BillingEntityUpdateByExternalIDParams::InvoiceSettings, nil]
35
+ optional :invoice_settings,
36
+ -> { Orb::Account::BillingEntityUpdateByExternalIDParams::InvoiceSettings },
37
+ nil?: true
38
+
39
+ # @!attribute legal_name
40
+ # The legal name printed on invoices.
41
+ #
42
+ # @return [String, nil]
43
+ optional :legal_name, String, nil?: true
44
+
45
+ # @!attribute name
46
+ # An internal name for the billing entity.
47
+ #
48
+ # @return [String, nil]
49
+ optional :name, String, nil?: true
50
+
51
+ # @!attribute payment_gateway_connections
52
+ # The full set of payment gateway connections the billing entity collects payments
53
+ # through. Omit it to keep the current ones. Naming another billing entity's
54
+ # connection gives this billing entity a connection of its own through the same
55
+ # Stripe account or Adyen merchant account.
56
+ #
57
+ # @return [Array<Orb::Models::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection>, nil]
58
+ optional :payment_gateway_connections,
59
+ -> {
60
+ Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection]
61
+ },
62
+ nil?: true
63
+
64
+ # @!attribute tax_registrations
65
+ # The full list of registrations. Omit it to keep the current ones.
66
+ #
67
+ # @return [Array<Orb::Models::Account::BillingEntityUpdateByExternalIDParams::TaxRegistration>, nil]
68
+ optional :tax_registrations,
69
+ -> {
70
+ Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntityUpdateByExternalIDParams::TaxRegistration]
71
+ },
72
+ nil?: true
73
+
74
+ # @!method initialize(external_billing_entity_id:, address: nil, default_payment_gateway_connection_id: nil, invoice_settings: nil, legal_name: nil, name: nil, payment_gateway_connections: nil, tax_registrations: nil, request_options: {})
75
+ # Some parameter documentations has been truncated, see
76
+ # {Orb::Models::Account::BillingEntityUpdateByExternalIDParams} for more details.
77
+ #
78
+ # @param external_billing_entity_id [String]
79
+ #
80
+ # @param address [Orb::Models::AddressInput, nil] Replaces the whole address. Omit it to keep the current one.
81
+ #
82
+ # @param default_payment_gateway_connection_id [String, nil] The ID of the connection Orb charges when the customer is not mapped to any of t
83
+ #
84
+ # @param invoice_settings [Orb::Models::Account::BillingEntityUpdateByExternalIDParams::InvoiceSettings, nil] The invoice settings to change. Omitted fields keep their value; null clears a f
85
+ #
86
+ # @param legal_name [String, nil] The legal name printed on invoices.
87
+ #
88
+ # @param name [String, nil] An internal name for the billing entity.
89
+ #
90
+ # @param payment_gateway_connections [Array<Orb::Models::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection>, nil] The full set of payment gateway connections the billing entity collects payments
91
+ #
92
+ # @param tax_registrations [Array<Orb::Models::Account::BillingEntityUpdateByExternalIDParams::TaxRegistration>, nil] The full list of registrations. Omit it to keep the current ones.
93
+ #
94
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
95
+
96
+ class InvoiceSettings < Orb::Internal::Type::BaseModel
97
+ # @!attribute memo
98
+ # The memo printed on the entity's invoices.
99
+ #
100
+ # @return [String, nil]
101
+ optional :memo, String, nil?: true
102
+
103
+ # @!method initialize(memo: nil)
104
+ # The invoice settings to change. Omitted fields keep their value; null clears a
105
+ # field so it inherits the account's setting.
106
+ #
107
+ # @param memo [String, nil] The memo printed on the entity's invoices.
108
+ end
109
+
110
+ class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
111
+ # @!attribute payment_gateway_connection_id
112
+ # The ID of a payment gateway connection of the account.
113
+ #
114
+ # @return [String]
115
+ required :payment_gateway_connection_id, String
116
+
117
+ # @!attribute payment_provider_type
118
+ # The connection's payment provider.
119
+ #
120
+ # @return [Symbol, Orb::Models::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection::PaymentProviderType]
121
+ required :payment_provider_type,
122
+ enum: -> { Orb::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection::PaymentProviderType }
123
+
124
+ # @!method initialize(payment_gateway_connection_id:, payment_provider_type:)
125
+ # @param payment_gateway_connection_id [String] The ID of a payment gateway connection of the account.
126
+ #
127
+ # @param payment_provider_type [Symbol, Orb::Models::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection::PaymentProviderType] The connection's payment provider.
128
+
129
+ # The connection's payment provider.
130
+ #
131
+ # @see Orb::Models::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection#payment_provider_type
132
+ module PaymentProviderType
133
+ extend Orb::Internal::Type::Enum
134
+
135
+ STRIPE = :stripe
136
+ ADYEN = :adyen
137
+
138
+ # @!method self.values
139
+ # @return [Array<Symbol>]
140
+ end
141
+ end
142
+
143
+ class TaxRegistration < Orb::Internal::Type::BaseModel
144
+ # @!attribute code
145
+ # The tax registration type, for example `DE VAT`.
146
+ #
147
+ # @return [String]
148
+ required :code, String
149
+
150
+ # @!attribute value
151
+ # The registration number.
152
+ #
153
+ # @return [String]
154
+ required :value, String
155
+
156
+ # @!attribute applies_to
157
+ # The jurisdiction the registration applies to. If null, it applies to every
158
+ # customer.
159
+ #
160
+ # @return [String, nil]
161
+ optional :applies_to, String, nil?: true
162
+
163
+ # @!method initialize(code:, value:, applies_to: nil)
164
+ # Some parameter documentations has been truncated, see
165
+ # {Orb::Models::Account::BillingEntityUpdateByExternalIDParams::TaxRegistration}
166
+ # for more details.
167
+ #
168
+ # @param code [String] The tax registration type, for example `DE VAT`.
169
+ #
170
+ # @param value [String] The registration number.
171
+ #
172
+ # @param applies_to [String, nil] The jurisdiction the registration applies to. If null, it applies to every custo
173
+ end
174
+ end
175
+ end
176
+ end
177
+ end
@@ -0,0 +1,179 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ # @see Orb::Resources::Account::BillingEntities#update
7
+ class BillingEntityUpdateParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute billing_entity_id
12
+ #
13
+ # @return [String]
14
+ required :billing_entity_id, String
15
+
16
+ # @!attribute address
17
+ # Replaces the whole address. Omit it to keep the current one.
18
+ #
19
+ # @return [Orb::Models::AddressInput, nil]
20
+ optional :address, -> { Orb::AddressInput }, nil?: true
21
+
22
+ # @!attribute default_payment_gateway_connection_id
23
+ # The ID of the connection Orb charges when the customer is not mapped to any of
24
+ # the billing entity's connections. Required when `payment_gateway_connections`
25
+ # has more than one entry.
26
+ #
27
+ # @return [String, nil]
28
+ optional :default_payment_gateway_connection_id, String, nil?: true
29
+
30
+ # @!attribute invoice_settings
31
+ # The invoice settings to change. Omitted fields keep their value; null clears a
32
+ # field so it inherits the account's setting.
33
+ #
34
+ # @return [Orb::Models::Account::BillingEntityUpdateParams::InvoiceSettings, nil]
35
+ optional :invoice_settings,
36
+ -> {
37
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings
38
+ },
39
+ nil?: true
40
+
41
+ # @!attribute legal_name
42
+ # The legal name printed on invoices.
43
+ #
44
+ # @return [String, nil]
45
+ optional :legal_name, String, nil?: true
46
+
47
+ # @!attribute name
48
+ # An internal name for the billing entity.
49
+ #
50
+ # @return [String, nil]
51
+ optional :name, String, nil?: true
52
+
53
+ # @!attribute payment_gateway_connections
54
+ # The full set of payment gateway connections the billing entity collects payments
55
+ # through. Omit it to keep the current ones. Naming another billing entity's
56
+ # connection gives this billing entity a connection of its own through the same
57
+ # Stripe account or Adyen merchant account.
58
+ #
59
+ # @return [Array<Orb::Models::Account::BillingEntityUpdateParams::PaymentGatewayConnection>, nil]
60
+ optional :payment_gateway_connections,
61
+ -> {
62
+ Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection]
63
+ },
64
+ nil?: true
65
+
66
+ # @!attribute tax_registrations
67
+ # The full list of registrations. Omit it to keep the current ones.
68
+ #
69
+ # @return [Array<Orb::Models::Account::BillingEntityUpdateParams::TaxRegistration>, nil]
70
+ optional :tax_registrations,
71
+ -> {
72
+ Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntityUpdateParams::TaxRegistration]
73
+ },
74
+ nil?: true
75
+
76
+ # @!method initialize(billing_entity_id:, address: nil, default_payment_gateway_connection_id: nil, invoice_settings: nil, legal_name: nil, name: nil, payment_gateway_connections: nil, tax_registrations: nil, request_options: {})
77
+ # Some parameter documentations has been truncated, see
78
+ # {Orb::Models::Account::BillingEntityUpdateParams} for more details.
79
+ #
80
+ # @param billing_entity_id [String]
81
+ #
82
+ # @param address [Orb::Models::AddressInput, nil] Replaces the whole address. Omit it to keep the current one.
83
+ #
84
+ # @param default_payment_gateway_connection_id [String, nil] The ID of the connection Orb charges when the customer is not mapped to any of t
85
+ #
86
+ # @param invoice_settings [Orb::Models::Account::BillingEntityUpdateParams::InvoiceSettings, nil] The invoice settings to change. Omitted fields keep their value; null clears a f
87
+ #
88
+ # @param legal_name [String, nil] The legal name printed on invoices.
89
+ #
90
+ # @param name [String, nil] An internal name for the billing entity.
91
+ #
92
+ # @param payment_gateway_connections [Array<Orb::Models::Account::BillingEntityUpdateParams::PaymentGatewayConnection>, nil] The full set of payment gateway connections the billing entity collects payments
93
+ #
94
+ # @param tax_registrations [Array<Orb::Models::Account::BillingEntityUpdateParams::TaxRegistration>, nil] The full list of registrations. Omit it to keep the current ones.
95
+ #
96
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
97
+
98
+ class InvoiceSettings < Orb::Internal::Type::BaseModel
99
+ # @!attribute memo
100
+ # The memo printed on the entity's invoices.
101
+ #
102
+ # @return [String, nil]
103
+ optional :memo, String, nil?: true
104
+
105
+ # @!method initialize(memo: nil)
106
+ # The invoice settings to change. Omitted fields keep their value; null clears a
107
+ # field so it inherits the account's setting.
108
+ #
109
+ # @param memo [String, nil] The memo printed on the entity's invoices.
110
+ end
111
+
112
+ class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
113
+ # @!attribute payment_gateway_connection_id
114
+ # The ID of a payment gateway connection of the account.
115
+ #
116
+ # @return [String]
117
+ required :payment_gateway_connection_id, String
118
+
119
+ # @!attribute payment_provider_type
120
+ # The connection's payment provider.
121
+ #
122
+ # @return [Symbol, Orb::Models::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType]
123
+ required :payment_provider_type,
124
+ enum: -> { Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType }
125
+
126
+ # @!method initialize(payment_gateway_connection_id:, payment_provider_type:)
127
+ # @param payment_gateway_connection_id [String] The ID of a payment gateway connection of the account.
128
+ #
129
+ # @param payment_provider_type [Symbol, Orb::Models::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType] The connection's payment provider.
130
+
131
+ # The connection's payment provider.
132
+ #
133
+ # @see Orb::Models::Account::BillingEntityUpdateParams::PaymentGatewayConnection#payment_provider_type
134
+ module PaymentProviderType
135
+ extend Orb::Internal::Type::Enum
136
+
137
+ STRIPE = :stripe
138
+ ADYEN = :adyen
139
+
140
+ # @!method self.values
141
+ # @return [Array<Symbol>]
142
+ end
143
+ end
144
+
145
+ class TaxRegistration < Orb::Internal::Type::BaseModel
146
+ # @!attribute code
147
+ # The tax registration type, for example `DE VAT`.
148
+ #
149
+ # @return [String]
150
+ required :code, String
151
+
152
+ # @!attribute value
153
+ # The registration number.
154
+ #
155
+ # @return [String]
156
+ required :value, String
157
+
158
+ # @!attribute applies_to
159
+ # The jurisdiction the registration applies to. If null, it applies to every
160
+ # customer.
161
+ #
162
+ # @return [String, nil]
163
+ optional :applies_to, String, nil?: true
164
+
165
+ # @!method initialize(code:, value:, applies_to: nil)
166
+ # Some parameter documentations has been truncated, see
167
+ # {Orb::Models::Account::BillingEntityUpdateParams::TaxRegistration} for more
168
+ # details.
169
+ #
170
+ # @param code [String] The tax registration type, for example `DE VAT`.
171
+ #
172
+ # @param value [String] The registration number.
173
+ #
174
+ # @param applies_to [String, nil] The jurisdiction the registration applies to. If null, it applies to every custo
175
+ end
176
+ end
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ # @see Orb::Resources::Account::PaymentGatewayConnections#list
7
+ class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The Orb-assigned unique identifier for the payment gateway connection.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute billing_entity_id
15
+ # The ID of the billing entity that collects payments through this connection.
16
+ #
17
+ # @return [String]
18
+ required :billing_entity_id, String
19
+
20
+ # @!attribute created_at
21
+ # The time the connection was created.
22
+ #
23
+ # @return [Time]
24
+ required :created_at, Time
25
+
26
+ # @!attribute external_account_id
27
+ # The ID of the account in the external payment provider.
28
+ #
29
+ # @return [String, nil]
30
+ required :external_account_id, String, nil?: true
31
+
32
+ # @!attribute is_default
33
+ # Whether this is the billing entity's default payment gateway connection.
34
+ #
35
+ # @return [Boolean]
36
+ required :is_default, Orb::Internal::Type::Boolean
37
+
38
+ # @!attribute provider_type
39
+ # The external payment provider of this connection.
40
+ #
41
+ # @return [Symbol, Orb::Models::Account::PaymentGatewayConnection::ProviderType]
42
+ required :provider_type, enum: -> { Orb::Account::PaymentGatewayConnection::ProviderType }
43
+
44
+ # @!method initialize(id:, billing_entity_id:, created_at:, external_account_id:, is_default:, provider_type:)
45
+ # A payment gateway connection is one Stripe account or one Adyen merchant account
46
+ # that a billing entity collects payments through.
47
+ #
48
+ # @param id [String] The Orb-assigned unique identifier for the payment gateway connection.
49
+ #
50
+ # @param billing_entity_id [String] The ID of the billing entity that collects payments through this connection.
51
+ #
52
+ # @param created_at [Time] The time the connection was created.
53
+ #
54
+ # @param external_account_id [String, nil] The ID of the account in the external payment provider.
55
+ #
56
+ # @param is_default [Boolean] Whether this is the billing entity's default payment gateway connection.
57
+ #
58
+ # @param provider_type [Symbol, Orb::Models::Account::PaymentGatewayConnection::ProviderType] The external payment provider of this connection.
59
+
60
+ # The external payment provider of this connection.
61
+ #
62
+ # @see Orb::Models::Account::PaymentGatewayConnection#provider_type
63
+ module ProviderType
64
+ extend Orb::Internal::Type::Enum
65
+
66
+ STRIPE = :stripe
67
+ ADYEN = :adyen
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ # @see Orb::Resources::Account::PaymentGatewayConnections#fetch
7
+ class PaymentGatewayConnectionFetchParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute payment_gateway_connection_id
12
+ #
13
+ # @return [String]
14
+ required :payment_gateway_connection_id, String
15
+
16
+ # @!method initialize(payment_gateway_connection_id:, request_options: {})
17
+ # @param payment_gateway_connection_id [String]
18
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ # @see Orb::Resources::Account::PaymentGatewayConnections#list
7
+ class PaymentGatewayConnectionListParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute billing_entity_id
12
+ # Only return connections of this billing entity.
13
+ #
14
+ # @return [String, nil]
15
+ optional :billing_entity_id, String, nil?: true
16
+
17
+ # @!attribute cursor
18
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
19
+ # from the initial request.
20
+ #
21
+ # @return [String, nil]
22
+ optional :cursor, String, nil?: true
23
+
24
+ # @!attribute limit
25
+ # The number of items to fetch. Defaults to 20.
26
+ #
27
+ # @return [Integer, nil]
28
+ optional :limit, Integer
29
+
30
+ # @!attribute provider_type
31
+ # Only return connections of this payment provider.
32
+ #
33
+ # @return [Symbol, Orb::Models::Account::PaymentGatewayConnectionListParams::ProviderType, nil]
34
+ optional :provider_type,
35
+ enum: -> { Orb::Account::PaymentGatewayConnectionListParams::ProviderType },
36
+ nil?: true
37
+
38
+ # @!method initialize(billing_entity_id: nil, cursor: nil, limit: nil, provider_type: nil, request_options: {})
39
+ # Some parameter documentations has been truncated, see
40
+ # {Orb::Models::Account::PaymentGatewayConnectionListParams} for more details.
41
+ #
42
+ # @param billing_entity_id [String, nil] Only return connections of this billing entity.
43
+ #
44
+ # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
45
+ #
46
+ # @param limit [Integer] The number of items to fetch. Defaults to 20.
47
+ #
48
+ # @param provider_type [Symbol, Orb::Models::Account::PaymentGatewayConnectionListParams::ProviderType, nil] Only return connections of this payment provider.
49
+ #
50
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
51
+
52
+ # Only return connections of this payment provider.
53
+ module ProviderType
54
+ extend Orb::Internal::Type::Enum
55
+
56
+ STRIPE = :stripe
57
+ ADYEN = :adyen
58
+
59
+ # @!method self.values
60
+ # @return [Array<Symbol>]
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::PaymentGatewayConnections#create
7
+ class CustomerPaymentGatewayConnection < Orb::Internal::Type::BaseModel
8
+ # @!attribute billing_entity_id
9
+ # The ID of the billing entity that collects payments through the connection.
10
+ #
11
+ # @return [String]
12
+ required :billing_entity_id, String
13
+
14
+ # @!attribute created_at
15
+ # The time the mapping was created.
16
+ #
17
+ # @return [Time]
18
+ required :created_at, Time
19
+
20
+ # @!attribute external_account_id
21
+ # The ID of the account in the external payment provider.
22
+ #
23
+ # @return [String, nil]
24
+ required :external_account_id, String, nil?: true
25
+
26
+ # @!attribute is_default
27
+ # Whether Orb charges the customer for that billing entity's invoices through this
28
+ # mapping. On the default billing entity, it is the mapping the customer's
29
+ # `payment_provider_id` reflects.
30
+ #
31
+ # @return [Boolean]
32
+ required :is_default, Orb::Internal::Type::Boolean
33
+
34
+ # @!attribute payment_gateway_connection_id
35
+ # The ID of the payment gateway connection the customer is mapped to.
36
+ #
37
+ # @return [String]
38
+ required :payment_gateway_connection_id, String
39
+
40
+ # @!attribute provider_customer_id
41
+ # The ID of the customer in the external payment provider, or null if none is set.
42
+ #
43
+ # @return [String, nil]
44
+ required :provider_customer_id, String, nil?: true
45
+
46
+ # @!attribute provider_type
47
+ # The external payment provider of the connection.
48
+ #
49
+ # @return [Symbol, Orb::Models::Customers::CustomerPaymentGatewayConnection::ProviderType]
50
+ required :provider_type, enum: -> { Orb::Customers::CustomerPaymentGatewayConnection::ProviderType }
51
+
52
+ # @!method initialize(billing_entity_id:, created_at:, external_account_id:, is_default:, payment_gateway_connection_id:, provider_customer_id:, provider_type:)
53
+ # Some parameter documentations has been truncated, see
54
+ # {Orb::Models::Customers::CustomerPaymentGatewayConnection} for more details.
55
+ #
56
+ # A customer's mapping to one payment gateway connection.
57
+ #
58
+ # @param billing_entity_id [String] The ID of the billing entity that collects payments through the connection.
59
+ #
60
+ # @param created_at [Time] The time the mapping was created.
61
+ #
62
+ # @param external_account_id [String, nil] The ID of the account in the external payment provider.
63
+ #
64
+ # @param is_default [Boolean] Whether Orb charges the customer for that billing entity's invoices through this
65
+ #
66
+ # @param payment_gateway_connection_id [String] The ID of the payment gateway connection the customer is mapped to.
67
+ #
68
+ # @param provider_customer_id [String, nil] The ID of the customer in the external payment provider, or null if none is set.
69
+ #
70
+ # @param provider_type [Symbol, Orb::Models::Customers::CustomerPaymentGatewayConnection::ProviderType] The external payment provider of the connection.
71
+
72
+ # The external payment provider of the connection.
73
+ #
74
+ # @see Orb::Models::Customers::CustomerPaymentGatewayConnection#provider_type
75
+ module ProviderType
76
+ extend Orb::Internal::Type::Enum
77
+
78
+ STRIPE = :stripe
79
+ ADYEN = :adyen
80
+
81
+ # @!method self.values
82
+ # @return [Array<Symbol>]
83
+ end
84
+ end
85
+ end
86
+
87
+ CustomerPaymentGatewayConnection = Customers::CustomerPaymentGatewayConnection
88
+ end
89
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ module Customers
6
+ # @see Orb::Resources::Customers::PaymentGatewayConnections#create_by_external_id
7
+ class PaymentGatewayConnectionCreateByExternalIDParams < Orb::Internal::Type::BaseModel
8
+ extend Orb::Internal::Type::RequestParameters::Converter
9
+ include Orb::Internal::Type::RequestParameters
10
+
11
+ # @!attribute external_customer_id
12
+ #
13
+ # @return [String]
14
+ required :external_customer_id, String
15
+
16
+ # @!attribute payment_gateway_connection_id
17
+ # The ID of the payment gateway connection to map the customer to.
18
+ #
19
+ # @return [String]
20
+ required :payment_gateway_connection_id, String
21
+
22
+ # @!attribute is_default
23
+ # Whether Orb charges the customer for the billing entity's invoices through this
24
+ # mapping. The customer's first mapping for a billing entity is the default
25
+ # regardless.
26
+ #
27
+ # @return [Boolean, nil]
28
+ optional :is_default, Orb::Internal::Type::Boolean
29
+
30
+ # @!attribute provider_customer_id
31
+ # The ID of the customer in the external payment provider.
32
+ #
33
+ # @return [String, nil]
34
+ optional :provider_customer_id, String, nil?: true
35
+
36
+ # @!method initialize(external_customer_id:, payment_gateway_connection_id:, is_default: nil, provider_customer_id: nil, request_options: {})
37
+ # Some parameter documentations has been truncated, see
38
+ # {Orb::Models::Customers::PaymentGatewayConnectionCreateByExternalIDParams} for
39
+ # more details.
40
+ #
41
+ # @param external_customer_id [String]
42
+ #
43
+ # @param payment_gateway_connection_id [String] The ID of the payment gateway connection to map the customer to.
44
+ #
45
+ # @param is_default [Boolean] Whether Orb charges the customer for the billing entity's invoices through this
46
+ #
47
+ # @param provider_customer_id [String, nil] The ID of the customer in the external payment provider.
48
+ #
49
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
50
+ end
51
+ end
52
+ end
53
+ end