maxio-advanced-billing-sdk 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -41
- data/lib/advanced_billing/controllers/advance_invoice_controller.rb +3 -3
- data/lib/advanced_billing/controllers/api_exports_controller.rb +9 -9
- data/lib/advanced_billing/controllers/base_controller.rb +1 -1
- data/lib/advanced_billing/controllers/billing_portal_controller.rb +4 -4
- data/lib/advanced_billing/controllers/component_price_points_controller.rb +11 -11
- data/lib/advanced_billing/controllers/components_controller.rb +12 -12
- data/lib/advanced_billing/controllers/coupons_controller.rb +14 -14
- data/lib/advanced_billing/controllers/custom_fields_controller.rb +9 -9
- data/lib/advanced_billing/controllers/customers_controller.rb +7 -7
- data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +6 -6
- data/lib/advanced_billing/controllers/events_controller.rb +3 -3
- data/lib/advanced_billing/controllers/insights_controller.rb +4 -4
- data/lib/advanced_billing/controllers/invoices_controller.rb +17 -17
- data/lib/advanced_billing/controllers/offers_controller.rb +5 -5
- data/lib/advanced_billing/controllers/payment_profiles_controller.rb +12 -12
- data/lib/advanced_billing/controllers/product_families_controller.rb +4 -4
- data/lib/advanced_billing/controllers/product_price_points_controller.rb +11 -11
- data/lib/advanced_billing/controllers/products_controller.rb +6 -6
- data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +9 -9
- data/lib/advanced_billing/controllers/reason_codes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/referral_codes_controller.rb +1 -1
- data/lib/advanced_billing/controllers/sales_commissions_controller.rb +3 -3
- data/lib/advanced_billing/controllers/sites_controller.rb +3 -3
- data/lib/advanced_billing/controllers/subscription_components_controller.rb +17 -17
- data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +4 -4
- data/lib/advanced_billing/controllers/subscription_groups_controller.rb +9 -9
- data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +6 -6
- data/lib/advanced_billing/controllers/subscription_notes_controller.rb +5 -5
- data/lib/advanced_billing/controllers/subscription_products_controller.rb +2 -2
- data/lib/advanced_billing/controllers/subscription_status_controller.rb +10 -10
- data/lib/advanced_billing/controllers/subscriptions_controller.rb +12 -12
- data/lib/advanced_billing/controllers/webhooks_controller.rb +6 -6
- data/lib/advanced_billing/models/cancellation_method.rb +4 -1
- data/lib/advanced_billing/models/create_invoice_payment.rb +17 -3
- data/lib/advanced_billing/models/customer.rb +29 -2
- data/lib/advanced_billing/models/customer_attributes.rb +16 -0
- data/lib/advanced_billing/models/invoice_payment.rb +24 -1
- data/lib/advanced_billing/models/list_products_filter.rb +12 -2
- data/lib/advanced_billing/models/update_subscription.rb +25 -1
- metadata +2 -2
@@ -11,7 +11,7 @@ module AdvancedBilling
|
|
11
11
|
# Subscription's open, payable invoices.
|
12
12
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
13
13
|
# the subscription
|
14
|
-
# @return [AccountBalances] response from the API call
|
14
|
+
# @return [AccountBalances] response from the API call.
|
15
15
|
def read_account_balances(subscription_id)
|
16
16
|
new_api_call_builder
|
17
17
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -39,7 +39,7 @@ module AdvancedBilling
|
|
39
39
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
40
40
|
# the subscription
|
41
41
|
# @param [CreatePrepaymentRequest] body Optional parameter: Example:
|
42
|
-
# @return [CreatePrepaymentResponse] response from the API call
|
42
|
+
# @return [CreatePrepaymentResponse] response from the API call.
|
43
43
|
def create_prepayment(subscription_id,
|
44
44
|
body: nil)
|
45
45
|
new_api_call_builder
|
@@ -80,7 +80,7 @@ module AdvancedBilling
|
|
80
80
|
# Use in query `per_page=200`.
|
81
81
|
# @param [ListPrepaymentsFilter] filter Optional parameter: Filter to use
|
82
82
|
# for List Prepayments operations
|
83
|
-
# @return [PrepaymentsResponse] response from the API call
|
83
|
+
# @return [PrepaymentsResponse] response from the API call.
|
84
84
|
def list_prepayments(options = {})
|
85
85
|
new_api_call_builder
|
86
86
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -110,7 +110,7 @@ module AdvancedBilling
|
|
110
110
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
111
111
|
# the subscription
|
112
112
|
# @param [IssueServiceCreditRequest] body Optional parameter: Example:
|
113
|
-
# @return [ServiceCredit] response from the API call
|
113
|
+
# @return [ServiceCredit] response from the API call.
|
114
114
|
def issue_service_credit(subscription_id,
|
115
115
|
body: nil)
|
116
116
|
new_api_call_builder
|
@@ -141,7 +141,7 @@ module AdvancedBilling
|
|
141
141
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
142
142
|
# the subscription
|
143
143
|
# @param [DeductServiceCreditRequest] body Optional parameter: Example:
|
144
|
-
# @return [void] response from the API call
|
144
|
+
# @return [void] response from the API call.
|
145
145
|
def deduct_service_credit(subscription_id,
|
146
146
|
body: nil)
|
147
147
|
new_api_call_builder
|
@@ -174,7 +174,7 @@ module AdvancedBilling
|
|
174
174
|
# the subscription
|
175
175
|
# @param [Integer] prepayment_id Required parameter: id of prepayment
|
176
176
|
# @param [RefundPrepaymentRequest] body Optional parameter: Example:
|
177
|
-
# @return [PrepaymentResponse] response from the API call
|
177
|
+
# @return [PrepaymentResponse] response from the API call.
|
178
178
|
def refund_prepayment(subscription_id,
|
179
179
|
prepayment_id,
|
180
180
|
body: nil)
|
@@ -19,7 +19,7 @@ module AdvancedBilling
|
|
19
19
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
20
20
|
# the subscription
|
21
21
|
# @param [UpdateSubscriptionNoteRequest] body Optional parameter: Example:
|
22
|
-
# @return [SubscriptionNoteResponse] response from the API call
|
22
|
+
# @return [SubscriptionNoteResponse] response from the API call.
|
23
23
|
def create_subscription_note(subscription_id,
|
24
24
|
body: nil)
|
25
25
|
new_api_call_builder
|
@@ -55,7 +55,7 @@ module AdvancedBilling
|
|
55
55
|
# many records to fetch in each request. Default value is 20. The maximum
|
56
56
|
# allowed values is 200; any per_page value over 200 will be changed to 200.
|
57
57
|
# Use in query `per_page=200`.
|
58
|
-
# @return [Array[SubscriptionNoteResponse]] response from the API call
|
58
|
+
# @return [Array[SubscriptionNoteResponse]] response from the API call.
|
59
59
|
def list_subscription_notes(options = {})
|
60
60
|
new_api_call_builder
|
61
61
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -81,7 +81,7 @@ module AdvancedBilling
|
|
81
81
|
# the subscription
|
82
82
|
# @param [Integer] note_id Required parameter: The Advanced Billing id of
|
83
83
|
# the note
|
84
|
-
# @return [SubscriptionNoteResponse] response from the API call
|
84
|
+
# @return [SubscriptionNoteResponse] response from the API call.
|
85
85
|
def read_subscription_note(subscription_id,
|
86
86
|
note_id)
|
87
87
|
new_api_call_builder
|
@@ -108,7 +108,7 @@ module AdvancedBilling
|
|
108
108
|
# @param [Integer] note_id Required parameter: The Advanced Billing id of
|
109
109
|
# the note
|
110
110
|
# @param [UpdateSubscriptionNoteRequest] body Optional parameter: Example:
|
111
|
-
# @return [SubscriptionNoteResponse] response from the API call
|
111
|
+
# @return [SubscriptionNoteResponse] response from the API call.
|
112
112
|
def update_subscription_note(subscription_id,
|
113
113
|
note_id,
|
114
114
|
body: nil)
|
@@ -138,7 +138,7 @@ module AdvancedBilling
|
|
138
138
|
# the subscription
|
139
139
|
# @param [Integer] note_id Required parameter: The Advanced Billing id of
|
140
140
|
# the note
|
141
|
-
# @return [void] response from the API call
|
141
|
+
# @return [void] response from the API call.
|
142
142
|
def delete_subscription_note(subscription_id,
|
143
143
|
note_id)
|
144
144
|
new_api_call_builder
|
@@ -103,7 +103,7 @@ module AdvancedBilling
|
|
103
103
|
# the subscription
|
104
104
|
# @param [SubscriptionProductMigrationRequest] body Optional parameter:
|
105
105
|
# Example:
|
106
|
-
# @return [SubscriptionResponse] response from the API call
|
106
|
+
# @return [SubscriptionResponse] response from the API call.
|
107
107
|
def migrate_subscription_product(subscription_id,
|
108
108
|
body: nil)
|
109
109
|
new_api_call_builder
|
@@ -140,7 +140,7 @@ module AdvancedBilling
|
|
140
140
|
# the subscription
|
141
141
|
# @param [SubscriptionMigrationPreviewRequest] body Optional parameter:
|
142
142
|
# Example:
|
143
|
-
# @return [SubscriptionMigrationPreviewResponse] response from the API call
|
143
|
+
# @return [SubscriptionMigrationPreviewResponse] response from the API call.
|
144
144
|
def preview_subscription_product_migration(subscription_id,
|
145
145
|
body: nil)
|
146
146
|
new_api_call_builder
|
@@ -14,7 +14,7 @@ module AdvancedBilling
|
|
14
14
|
# The response will be `422 "Unprocessable Entity`.
|
15
15
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
16
16
|
# the subscription
|
17
|
-
# @return [SubscriptionResponse] response from the API call
|
17
|
+
# @return [SubscriptionResponse] response from the API call.
|
18
18
|
def retry_subscription(subscription_id)
|
19
19
|
new_api_call_builder
|
20
20
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
@@ -40,7 +40,7 @@ module AdvancedBilling
|
|
40
40
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
41
41
|
# the subscription
|
42
42
|
# @param [CancellationRequest] body Optional parameter: Example:
|
43
|
-
# @return [SubscriptionResponse] response from the API call
|
43
|
+
# @return [SubscriptionResponse] response from the API call.
|
44
44
|
def cancel_subscription(subscription_id,
|
45
45
|
body: nil)
|
46
46
|
new_api_call_builder
|
@@ -77,7 +77,7 @@ module AdvancedBilling
|
|
77
77
|
# @param [ResumptionCharge] calendar_billing_resumption_charge Optional
|
78
78
|
# parameter: (For calendar billing subscriptions only) The way that the
|
79
79
|
# resumed subscription's charge should be handled
|
80
|
-
# @return [SubscriptionResponse] response from the API call
|
80
|
+
# @return [SubscriptionResponse] response from the API call.
|
81
81
|
def resume_subscription(subscription_id,
|
82
82
|
calendar_billing_resumption_charge: ResumptionCharge::PRORATED)
|
83
83
|
new_api_call_builder
|
@@ -108,7 +108,7 @@ module AdvancedBilling
|
|
108
108
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
109
109
|
# the subscription
|
110
110
|
# @param [PauseRequest] body Optional parameter: Example:
|
111
|
-
# @return [SubscriptionResponse] response from the API call
|
111
|
+
# @return [SubscriptionResponse] response from the API call.
|
112
112
|
def pause_subscription(subscription_id,
|
113
113
|
body: nil)
|
114
114
|
new_api_call_builder
|
@@ -143,7 +143,7 @@ module AdvancedBilling
|
|
143
143
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
144
144
|
# the subscription
|
145
145
|
# @param [PauseRequest] body Optional parameter: Example:
|
146
|
-
# @return [SubscriptionResponse] response from the API call
|
146
|
+
# @return [SubscriptionResponse] response from the API call.
|
147
147
|
def update_automatic_subscription_resumption(subscription_id,
|
148
148
|
body: nil)
|
149
149
|
new_api_call_builder
|
@@ -309,7 +309,7 @@ module AdvancedBilling
|
|
309
309
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
310
310
|
# the subscription
|
311
311
|
# @param [ReactivateSubscriptionRequest] body Optional parameter: Example:
|
312
|
-
# @return [SubscriptionResponse] response from the API call
|
312
|
+
# @return [SubscriptionResponse] response from the API call.
|
313
313
|
def reactivate_subscription(subscription_id,
|
314
314
|
body: nil)
|
315
315
|
new_api_call_builder
|
@@ -343,7 +343,7 @@ module AdvancedBilling
|
|
343
343
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
344
344
|
# the subscription
|
345
345
|
# @param [CancellationRequest] body Optional parameter: Example:
|
346
|
-
# @return [DelayedCancellationResponse] response from the API call
|
346
|
+
# @return [DelayedCancellationResponse] response from the API call.
|
347
347
|
def initiate_delayed_cancellation(subscription_id,
|
348
348
|
body: nil)
|
349
349
|
new_api_call_builder
|
@@ -375,7 +375,7 @@ module AdvancedBilling
|
|
375
375
|
# will be successful.
|
376
376
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
377
377
|
# the subscription
|
378
|
-
# @return [DelayedCancellationResponse] response from the API call
|
378
|
+
# @return [DelayedCancellationResponse] response from the API call.
|
379
379
|
def cancel_delayed_cancellation(subscription_id)
|
380
380
|
new_api_call_builder
|
381
381
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -399,7 +399,7 @@ module AdvancedBilling
|
|
399
399
|
# active and the active Dunner will be resolved.
|
400
400
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
401
401
|
# the subscription
|
402
|
-
# @return [SubscriptionResponse] response from the API call
|
402
|
+
# @return [SubscriptionResponse] response from the API call.
|
403
403
|
def cancel_dunning(subscription_id)
|
404
404
|
new_api_call_builder
|
405
405
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -451,7 +451,7 @@ module AdvancedBilling
|
|
451
451
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
452
452
|
# the subscription
|
453
453
|
# @param [RenewalPreviewRequest] body Optional parameter: Example:
|
454
|
-
# @return [RenewalPreviewResponse] response from the API call
|
454
|
+
# @return [RenewalPreviewResponse] response from the API call.
|
455
455
|
def preview_renewal(subscription_id,
|
456
456
|
body: nil)
|
457
457
|
new_api_call_builder
|
@@ -795,7 +795,7 @@ module AdvancedBilling
|
|
795
795
|
# }
|
796
796
|
# ```
|
797
797
|
# @param [CreateSubscriptionRequest] body Optional parameter: Example:
|
798
|
-
# @return [SubscriptionResponse] response from the API call
|
798
|
+
# @return [SubscriptionResponse] response from the API call.
|
799
799
|
def create_subscription(body: nil)
|
800
800
|
new_api_call_builder
|
801
801
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -881,7 +881,7 @@ module AdvancedBilling
|
|
881
881
|
# @param [Array[SubscriptionListInclude]] include Optional parameter: Allows
|
882
882
|
# including additional data in the response. Use in query:
|
883
883
|
# `include[]=self_service_page_token`.
|
884
|
-
# @return [Array[SubscriptionResponse]] response from the API call
|
884
|
+
# @return [Array[SubscriptionResponse]] response from the API call.
|
885
885
|
def list_subscriptions(options = {})
|
886
886
|
new_api_call_builder
|
887
887
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -977,7 +977,7 @@ module AdvancedBilling
|
|
977
977
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
978
978
|
# the subscription
|
979
979
|
# @param [UpdateSubscriptionRequest] body Optional parameter: Example:
|
980
|
-
# @return [SubscriptionResponse] response from the API call
|
980
|
+
# @return [SubscriptionResponse] response from the API call.
|
981
981
|
def update_subscription(subscription_id,
|
982
982
|
body: nil)
|
983
983
|
new_api_call_builder
|
@@ -1012,7 +1012,7 @@ module AdvancedBilling
|
|
1012
1012
|
# @param [Array[SubscriptionInclude]] include Optional parameter: Allows
|
1013
1013
|
# including additional data in the response. Use in query:
|
1014
1014
|
# `include[]=coupons&include[]=self_service_page_token`.
|
1015
|
-
# @return [SubscriptionResponse] response from the API call
|
1015
|
+
# @return [SubscriptionResponse] response from the API call.
|
1016
1016
|
def read_subscription(subscription_id,
|
1017
1017
|
include: nil)
|
1018
1018
|
new_api_call_builder
|
@@ -1068,7 +1068,7 @@ module AdvancedBilling
|
|
1068
1068
|
# the subscription
|
1069
1069
|
# @param [OverrideSubscriptionRequest] body Optional parameter: Only these
|
1070
1070
|
# fields are available to be set.
|
1071
|
-
# @return [void] response from the API call
|
1071
|
+
# @return [void] response from the API call.
|
1072
1072
|
def override_subscription(subscription_id,
|
1073
1073
|
body: nil)
|
1074
1074
|
new_api_call_builder
|
@@ -1093,7 +1093,7 @@ module AdvancedBilling
|
|
1093
1093
|
|
1094
1094
|
# Use this endpoint to find a subscription by its reference.
|
1095
1095
|
# @param [String] reference Optional parameter: Subscription reference
|
1096
|
-
# @return [SubscriptionResponse] response from the API call
|
1096
|
+
# @return [SubscriptionResponse] response from the API call.
|
1097
1097
|
def find_subscription(reference: nil)
|
1098
1098
|
new_api_call_builder
|
1099
1099
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -1125,7 +1125,7 @@ module AdvancedBilling
|
|
1125
1125
|
# @param [Array[SubscriptionPurgeType]] cascade Optional parameter: Options
|
1126
1126
|
# are "customer" or "payment_profile". Use in query:
|
1127
1127
|
# `cascade[]=customer&cascade[]=payment_profile`.
|
1128
|
-
# @return [void] response from the API call
|
1128
|
+
# @return [void] response from the API call.
|
1129
1129
|
def purge_subscription(subscription_id,
|
1130
1130
|
ack,
|
1131
1131
|
cascade: nil)
|
@@ -1151,7 +1151,7 @@ module AdvancedBilling
|
|
1151
1151
|
# the subscription
|
1152
1152
|
# @param [UpsertPrepaidConfigurationRequest] body Optional parameter:
|
1153
1153
|
# Example:
|
1154
|
-
# @return [PrepaidConfigurationResponse] response from the API call
|
1154
|
+
# @return [PrepaidConfigurationResponse] response from the API call.
|
1155
1155
|
def update_prepaid_subscription_configuration(subscription_id,
|
1156
1156
|
body: nil)
|
1157
1157
|
new_api_call_builder
|
@@ -1208,7 +1208,7 @@ module AdvancedBilling
|
|
1208
1208
|
# If you'd like to calculate subscriptions that do not include tax, please
|
1209
1209
|
# feel free to leave off the billing information.
|
1210
1210
|
# @param [CreateSubscriptionRequest] body Optional parameter: Example:
|
1211
|
-
# @return [SubscriptionPreviewResponse] response from the API call
|
1211
|
+
# @return [SubscriptionPreviewResponse] response from the API call.
|
1212
1212
|
def preview_subscription(body: nil)
|
1213
1213
|
new_api_call_builder
|
1214
1214
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -1243,7 +1243,7 @@ module AdvancedBilling
|
|
1243
1243
|
# @param [String] code Optional parameter: A code for the coupon that would
|
1244
1244
|
# be applied to a subscription
|
1245
1245
|
# @param [AddCouponsRequest] body Optional parameter: Example:
|
1246
|
-
# @return [SubscriptionResponse] response from the API call
|
1246
|
+
# @return [SubscriptionResponse] response from the API call.
|
1247
1247
|
def apply_coupons_to_subscription(subscription_id,
|
1248
1248
|
code: nil,
|
1249
1249
|
body: nil)
|
@@ -1278,7 +1278,7 @@ module AdvancedBilling
|
|
1278
1278
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
1279
1279
|
# the subscription
|
1280
1280
|
# @param [String] coupon_code Optional parameter: The coupon code
|
1281
|
-
# @return [String] response from the API call
|
1281
|
+
# @return [String] response from the API call.
|
1282
1282
|
def remove_coupon_from_subscription(subscription_id,
|
1283
1283
|
coupon_code: nil)
|
1284
1284
|
new_api_call_builder
|
@@ -1355,7 +1355,7 @@ module AdvancedBilling
|
|
1355
1355
|
# @param [Integer] subscription_id Required parameter: The Chargify id of
|
1356
1356
|
# the subscription
|
1357
1357
|
# @param [ActivateSubscriptionRequest] body Optional parameter: Example:
|
1358
|
-
# @return [SubscriptionResponse] response from the API call
|
1358
|
+
# @return [SubscriptionResponse] response from the API call.
|
1359
1359
|
def activate_subscription(subscription_id,
|
1360
1360
|
body: nil)
|
1361
1361
|
new_api_call_builder
|
@@ -53,7 +53,7 @@ module AdvancedBilling
|
|
53
53
|
# Webhooks are returned.
|
54
54
|
# @param [Integer] subscription Optional parameter: The Advanced Billing id
|
55
55
|
# of a subscription you'd like to filter for
|
56
|
-
# @return [Array[WebhookResponse]] response from the API call
|
56
|
+
# @return [Array[WebhookResponse]] response from the API call.
|
57
57
|
def list_webhooks(options = {})
|
58
58
|
new_api_call_builder
|
59
59
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -77,7 +77,7 @@ module AdvancedBilling
|
|
77
77
|
|
78
78
|
# This method allows you to enable webhooks via API for your site
|
79
79
|
# @param [EnableWebhooksRequest] body Optional parameter: Example:
|
80
|
-
# @return [EnableWebhooksResponse] response from the API call
|
80
|
+
# @return [EnableWebhooksResponse] response from the API call.
|
81
81
|
def enable_webhooks(body: nil)
|
82
82
|
new_api_call_builder
|
83
83
|
.request(new_request_builder(HttpMethodEnum::PUT,
|
@@ -100,7 +100,7 @@ module AdvancedBilling
|
|
100
100
|
# You may submit an array of up to 1000 webhook IDs to replay in the
|
101
101
|
# request.
|
102
102
|
# @param [ReplayWebhooksRequest] body Optional parameter: Example:
|
103
|
-
# @return [ReplayWebhooksResponse] response from the API call
|
103
|
+
# @return [ReplayWebhooksResponse] response from the API call.
|
104
104
|
def replay_webhooks(body: nil)
|
105
105
|
new_api_call_builder
|
106
106
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -124,7 +124,7 @@ module AdvancedBilling
|
|
124
124
|
# keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-
|
125
125
|
# Reference#events)
|
126
126
|
# @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
|
127
|
-
# @return [EndpointResponse] response from the API call
|
127
|
+
# @return [EndpointResponse] response from the API call.
|
128
128
|
def create_endpoint(body: nil)
|
129
129
|
new_api_call_builder
|
130
130
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -146,7 +146,7 @@ module AdvancedBilling
|
|
146
146
|
end
|
147
147
|
|
148
148
|
# This method returns created endpoints for site.
|
149
|
-
# @return [Array[Endpoint]] response from the API call
|
149
|
+
# @return [Array[Endpoint]] response from the API call.
|
150
150
|
def list_endpoints
|
151
151
|
new_api_call_builder
|
152
152
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -176,7 +176,7 @@ module AdvancedBilling
|
|
176
176
|
# @param [Integer] endpoint_id Required parameter: The Advanced Billing id
|
177
177
|
# for the endpoint that should be updated
|
178
178
|
# @param [CreateOrUpdateEndpointRequest] body Optional parameter: Example:
|
179
|
-
# @return [EndpointResponse] response from the API call
|
179
|
+
# @return [EndpointResponse] response from the API call.
|
180
180
|
def update_endpoint(endpoint_id,
|
181
181
|
body: nil)
|
182
182
|
new_api_call_builder
|
@@ -21,7 +21,10 @@ module AdvancedBilling
|
|
21
21
|
BILLING_PORTAL = 'billing_portal'.freeze,
|
22
22
|
|
23
23
|
# TODO: Write general description for UNKNOWN
|
24
|
-
UNKNOWN = 'unknown'.freeze
|
24
|
+
UNKNOWN = 'unknown'.freeze,
|
25
|
+
|
26
|
+
# TODO: Write general description for IMPORTED
|
27
|
+
IMPORTED = 'imported'.freeze
|
25
28
|
].freeze
|
26
29
|
|
27
30
|
def self.validate(value)
|
@@ -13,7 +13,8 @@ module AdvancedBilling
|
|
13
13
|
# @return [Object]
|
14
14
|
attr_accessor :amount
|
15
15
|
|
16
|
-
# A description to be attached to the payment.
|
16
|
+
# A description to be attached to the payment. Applicable only to `external`
|
17
|
+
# payments.
|
17
18
|
# @return [String]
|
18
19
|
attr_accessor :memo
|
19
20
|
|
@@ -21,7 +22,8 @@ module AdvancedBilling
|
|
21
22
|
# @return [InvoicePaymentMethodType]
|
22
23
|
attr_accessor :method
|
23
24
|
|
24
|
-
# Additional information related to the payment method (eg. Check #)
|
25
|
+
# Additional information related to the payment method (eg. Check #).
|
26
|
+
# Applicable only to `external` payments.
|
25
27
|
# @return [String]
|
26
28
|
attr_accessor :details
|
27
29
|
|
@@ -29,6 +31,12 @@ module AdvancedBilling
|
|
29
31
|
# @return [Integer]
|
30
32
|
attr_accessor :payment_profile_id
|
31
33
|
|
34
|
+
# Date reflecting when the payment was received from a customer. Must be in
|
35
|
+
# the past. Applicable only to
|
36
|
+
# `external` payments.
|
37
|
+
# @return [Date]
|
38
|
+
attr_accessor :received_on
|
39
|
+
|
32
40
|
# A mapping from model property names to API property names.
|
33
41
|
def self.names
|
34
42
|
@_hash = {} if @_hash.nil?
|
@@ -37,6 +45,7 @@ module AdvancedBilling
|
|
37
45
|
@_hash['method'] = 'method'
|
38
46
|
@_hash['details'] = 'details'
|
39
47
|
@_hash['payment_profile_id'] = 'payment_profile_id'
|
48
|
+
@_hash['received_on'] = 'received_on'
|
40
49
|
@_hash
|
41
50
|
end
|
42
51
|
|
@@ -48,6 +57,7 @@ module AdvancedBilling
|
|
48
57
|
method
|
49
58
|
details
|
50
59
|
payment_profile_id
|
60
|
+
received_on
|
51
61
|
]
|
52
62
|
end
|
53
63
|
|
@@ -57,12 +67,14 @@ module AdvancedBilling
|
|
57
67
|
end
|
58
68
|
|
59
69
|
def initialize(amount: SKIP, memo: SKIP, method: SKIP, details: SKIP,
|
60
|
-
payment_profile_id: SKIP,
|
70
|
+
payment_profile_id: SKIP, received_on: SKIP,
|
71
|
+
additional_properties: {})
|
61
72
|
@amount = amount unless amount == SKIP
|
62
73
|
@memo = memo unless memo == SKIP
|
63
74
|
@method = method unless method == SKIP
|
64
75
|
@details = details unless details == SKIP
|
65
76
|
@payment_profile_id = payment_profile_id unless payment_profile_id == SKIP
|
77
|
+
@received_on = received_on unless received_on == SKIP
|
66
78
|
|
67
79
|
# Add additional model properties to the instance.
|
68
80
|
additional_properties.each do |_name, _value|
|
@@ -83,6 +95,7 @@ module AdvancedBilling
|
|
83
95
|
details = hash.key?('details') ? hash['details'] : SKIP
|
84
96
|
payment_profile_id =
|
85
97
|
hash.key?('payment_profile_id') ? hash['payment_profile_id'] : SKIP
|
98
|
+
received_on = hash.key?('received_on') ? hash['received_on'] : SKIP
|
86
99
|
|
87
100
|
# Clean out expected properties from Hash.
|
88
101
|
names.each_value { |k| hash.delete(k) }
|
@@ -93,6 +106,7 @@ module AdvancedBilling
|
|
93
106
|
method: method,
|
94
107
|
details: details,
|
95
108
|
payment_profile_id: payment_profile_id,
|
109
|
+
received_on: received_on,
|
96
110
|
additional_properties: hash)
|
97
111
|
end
|
98
112
|
|
@@ -85,8 +85,7 @@ module AdvancedBilling
|
|
85
85
|
# @return [String]
|
86
86
|
attr_accessor :phone
|
87
87
|
|
88
|
-
# Is the customer verified to use ACH as a payment method.
|
89
|
-
# Authorize.Net gateway
|
88
|
+
# Is the customer verified to use ACH as a payment method.
|
90
89
|
# @return [TrueClass | FalseClass]
|
91
90
|
attr_accessor :verified
|
92
91
|
|
@@ -133,6 +132,14 @@ module AdvancedBilling
|
|
133
132
|
# @return [String]
|
134
133
|
attr_accessor :salesforce_id
|
135
134
|
|
135
|
+
# The Tax Exemption Reason Code for the customer
|
136
|
+
# @return [String]
|
137
|
+
attr_accessor :tax_exempt_reason
|
138
|
+
|
139
|
+
# The default auto-renewal profile ID for the customer
|
140
|
+
# @return [Integer]
|
141
|
+
attr_accessor :default_auto_renewal_profile_id
|
142
|
+
|
136
143
|
# A mapping from model property names to API property names.
|
137
144
|
def self.names
|
138
145
|
@_hash = {} if @_hash.nil?
|
@@ -166,6 +173,9 @@ module AdvancedBilling
|
|
166
173
|
@_hash['default_subscription_group_uid'] =
|
167
174
|
'default_subscription_group_uid'
|
168
175
|
@_hash['salesforce_id'] = 'salesforce_id'
|
176
|
+
@_hash['tax_exempt_reason'] = 'tax_exempt_reason'
|
177
|
+
@_hash['default_auto_renewal_profile_id'] =
|
178
|
+
'default_auto_renewal_profile_id'
|
169
179
|
@_hash
|
170
180
|
end
|
171
181
|
|
@@ -200,6 +210,8 @@ module AdvancedBilling
|
|
200
210
|
locale
|
201
211
|
default_subscription_group_uid
|
202
212
|
salesforce_id
|
213
|
+
tax_exempt_reason
|
214
|
+
default_auto_renewal_profile_id
|
203
215
|
]
|
204
216
|
end
|
205
217
|
|
@@ -227,6 +239,8 @@ module AdvancedBilling
|
|
227
239
|
locale
|
228
240
|
default_subscription_group_uid
|
229
241
|
salesforce_id
|
242
|
+
tax_exempt_reason
|
243
|
+
default_auto_renewal_profile_id
|
230
244
|
]
|
231
245
|
end
|
232
246
|
|
@@ -240,6 +254,8 @@ module AdvancedBilling
|
|
240
254
|
portal_invite_last_accepted_at: SKIP, tax_exempt: SKIP,
|
241
255
|
vat_number: SKIP, parent_id: SKIP, locale: SKIP,
|
242
256
|
default_subscription_group_uid: SKIP, salesforce_id: SKIP,
|
257
|
+
tax_exempt_reason: SKIP,
|
258
|
+
default_auto_renewal_profile_id: SKIP,
|
243
259
|
additional_properties: {})
|
244
260
|
@first_name = first_name unless first_name == SKIP
|
245
261
|
@last_name = last_name unless last_name == SKIP
|
@@ -281,6 +297,11 @@ module AdvancedBilling
|
|
281
297
|
default_subscription_group_uid
|
282
298
|
end
|
283
299
|
@salesforce_id = salesforce_id unless salesforce_id == SKIP
|
300
|
+
@tax_exempt_reason = tax_exempt_reason unless tax_exempt_reason == SKIP
|
301
|
+
unless default_auto_renewal_profile_id == SKIP
|
302
|
+
@default_auto_renewal_profile_id =
|
303
|
+
default_auto_renewal_profile_id
|
304
|
+
end
|
284
305
|
|
285
306
|
# Add additional model properties to the instance.
|
286
307
|
additional_properties.each do |_name, _value|
|
@@ -342,6 +363,10 @@ module AdvancedBilling
|
|
342
363
|
default_subscription_group_uid =
|
343
364
|
hash.key?('default_subscription_group_uid') ? hash['default_subscription_group_uid'] : SKIP
|
344
365
|
salesforce_id = hash.key?('salesforce_id') ? hash['salesforce_id'] : SKIP
|
366
|
+
tax_exempt_reason =
|
367
|
+
hash.key?('tax_exempt_reason') ? hash['tax_exempt_reason'] : SKIP
|
368
|
+
default_auto_renewal_profile_id =
|
369
|
+
hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP
|
345
370
|
|
346
371
|
# Clean out expected properties from Hash.
|
347
372
|
names.each_value { |k| hash.delete(k) }
|
@@ -375,6 +400,8 @@ module AdvancedBilling
|
|
375
400
|
locale: locale,
|
376
401
|
default_subscription_group_uid: default_subscription_group_uid,
|
377
402
|
salesforce_id: salesforce_id,
|
403
|
+
tax_exempt_reason: tax_exempt_reason,
|
404
|
+
default_auto_renewal_profile_id: default_auto_renewal_profile_id,
|
378
405
|
additional_properties: hash)
|
379
406
|
end
|
380
407
|
|
@@ -105,6 +105,10 @@ module AdvancedBilling
|
|
105
105
|
# @return [String]
|
106
106
|
attr_accessor :salesforce_id
|
107
107
|
|
108
|
+
# (Optional) The default auto-renewal profile ID for the customer
|
109
|
+
# @return [Integer]
|
110
|
+
attr_accessor :default_auto_renewal_profile_id
|
111
|
+
|
108
112
|
# A mapping from model property names to API property names.
|
109
113
|
def self.names
|
110
114
|
@_hash = {} if @_hash.nil?
|
@@ -127,6 +131,8 @@ module AdvancedBilling
|
|
127
131
|
@_hash['metafields'] = 'metafields'
|
128
132
|
@_hash['parent_id'] = 'parent_id'
|
129
133
|
@_hash['salesforce_id'] = 'salesforce_id'
|
134
|
+
@_hash['default_auto_renewal_profile_id'] =
|
135
|
+
'default_auto_renewal_profile_id'
|
130
136
|
@_hash
|
131
137
|
end
|
132
138
|
|
@@ -152,6 +158,7 @@ module AdvancedBilling
|
|
152
158
|
metafields
|
153
159
|
parent_id
|
154
160
|
salesforce_id
|
161
|
+
default_auto_renewal_profile_id
|
155
162
|
]
|
156
163
|
end
|
157
164
|
|
@@ -161,6 +168,7 @@ module AdvancedBilling
|
|
161
168
|
address_2
|
162
169
|
parent_id
|
163
170
|
salesforce_id
|
171
|
+
default_auto_renewal_profile_id
|
164
172
|
]
|
165
173
|
end
|
166
174
|
|
@@ -170,6 +178,7 @@ module AdvancedBilling
|
|
170
178
|
zip: SKIP, country: SKIP, phone: SKIP, verified: SKIP,
|
171
179
|
tax_exempt: SKIP, vat_number: SKIP, metafields: SKIP,
|
172
180
|
parent_id: SKIP, salesforce_id: SKIP,
|
181
|
+
default_auto_renewal_profile_id: SKIP,
|
173
182
|
additional_properties: {})
|
174
183
|
@first_name = first_name unless first_name == SKIP
|
175
184
|
@last_name = last_name unless last_name == SKIP
|
@@ -190,6 +199,10 @@ module AdvancedBilling
|
|
190
199
|
@metafields = metafields unless metafields == SKIP
|
191
200
|
@parent_id = parent_id unless parent_id == SKIP
|
192
201
|
@salesforce_id = salesforce_id unless salesforce_id == SKIP
|
202
|
+
unless default_auto_renewal_profile_id == SKIP
|
203
|
+
@default_auto_renewal_profile_id =
|
204
|
+
default_auto_renewal_profile_id
|
205
|
+
end
|
193
206
|
|
194
207
|
# Add additional model properties to the instance.
|
195
208
|
additional_properties.each do |_name, _value|
|
@@ -221,6 +234,8 @@ module AdvancedBilling
|
|
221
234
|
metafields = hash.key?('metafields') ? hash['metafields'] : SKIP
|
222
235
|
parent_id = hash.key?('parent_id') ? hash['parent_id'] : SKIP
|
223
236
|
salesforce_id = hash.key?('salesforce_id') ? hash['salesforce_id'] : SKIP
|
237
|
+
default_auto_renewal_profile_id =
|
238
|
+
hash.key?('default_auto_renewal_profile_id') ? hash['default_auto_renewal_profile_id'] : SKIP
|
224
239
|
|
225
240
|
# Clean out expected properties from Hash.
|
226
241
|
names.each_value { |k| hash.delete(k) }
|
@@ -245,6 +260,7 @@ module AdvancedBilling
|
|
245
260
|
metafields: metafields,
|
246
261
|
parent_id: parent_id,
|
247
262
|
salesforce_id: salesforce_id,
|
263
|
+
default_auto_renewal_profile_id: default_auto_renewal_profile_id,
|
248
264
|
additional_properties: hash)
|
249
265
|
end
|
250
266
|
|