maxio-advanced-billing-sdk 4.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -45
  3. data/lib/advanced_billing/configuration.rb +2 -2
  4. data/lib/advanced_billing/controllers/advance_invoice_controller.rb +24 -24
  5. data/lib/advanced_billing/controllers/api_exports_controller.rb +57 -57
  6. data/lib/advanced_billing/controllers/base_controller.rb +10 -10
  7. data/lib/advanced_billing/controllers/billing_portal_controller.rb +33 -32
  8. data/lib/advanced_billing/controllers/component_price_points_controller.rb +60 -60
  9. data/lib/advanced_billing/controllers/components_controller.rb +110 -107
  10. data/lib/advanced_billing/controllers/coupons_controller.rb +89 -89
  11. data/lib/advanced_billing/controllers/custom_fields_controller.rb +76 -76
  12. data/lib/advanced_billing/controllers/customers_controller.rb +45 -41
  13. data/lib/advanced_billing/controllers/events_based_billing_segments_controller.rb +53 -53
  14. data/lib/advanced_billing/controllers/events_controller.rb +16 -15
  15. data/lib/advanced_billing/controllers/insights_controller.rb +17 -17
  16. data/lib/advanced_billing/controllers/invoices_controller.rb +99 -99
  17. data/lib/advanced_billing/controllers/offers_controller.rb +18 -15
  18. data/lib/advanced_billing/controllers/payment_profiles_controller.rb +107 -104
  19. data/lib/advanced_billing/controllers/product_families_controller.rb +26 -26
  20. data/lib/advanced_billing/controllers/product_price_points_controller.rb +62 -62
  21. data/lib/advanced_billing/controllers/products_controller.rb +37 -37
  22. data/lib/advanced_billing/controllers/proforma_invoices_controller.rb +61 -61
  23. data/lib/advanced_billing/controllers/reason_codes_controller.rb +35 -35
  24. data/lib/advanced_billing/controllers/referral_codes_controller.rb +9 -8
  25. data/lib/advanced_billing/controllers/sales_commissions_controller.rb +13 -13
  26. data/lib/advanced_billing/controllers/sites_controller.rb +11 -10
  27. data/lib/advanced_billing/controllers/subscription_components_controller.rb +170 -161
  28. data/lib/advanced_billing/controllers/subscription_group_invoice_account_controller.rb +23 -23
  29. data/lib/advanced_billing/controllers/subscription_group_status_controller.rb +21 -21
  30. data/lib/advanced_billing/controllers/subscription_groups_controller.rb +54 -54
  31. data/lib/advanced_billing/controllers/subscription_invoice_account_controller.rb +37 -37
  32. data/lib/advanced_billing/controllers/subscription_notes_controller.rb +20 -16
  33. data/lib/advanced_billing/controllers/subscription_products_controller.rb +20 -18
  34. data/lib/advanced_billing/controllers/subscription_status_controller.rb +74 -74
  35. data/lib/advanced_billing/controllers/subscriptions_controller.rb +163 -160
  36. data/lib/advanced_billing/controllers/webhooks_controller.rb +45 -44
  37. data/lib/advanced_billing/exceptions/component_allocation_error_exception.rb +15 -15
  38. data/lib/advanced_billing/exceptions/component_price_point_error_exception.rb +15 -15
  39. data/lib/advanced_billing/exceptions/customer_error_response_exception.rb +15 -15
  40. data/lib/advanced_billing/exceptions/error_array_map_response_exception.rb +15 -15
  41. data/lib/advanced_billing/exceptions/error_list_response_exception.rb +15 -15
  42. data/lib/advanced_billing/exceptions/error_string_map_response_exception.rb +15 -15
  43. data/lib/advanced_billing/exceptions/event_based_billing_list_segments_errors_exception.rb +15 -15
  44. data/lib/advanced_billing/exceptions/event_based_billing_segment_errors_exception.rb +15 -15
  45. data/lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb +15 -15
  46. data/lib/advanced_billing/exceptions/product_price_point_error_response_exception.rb +15 -15
  47. data/lib/advanced_billing/exceptions/proforma_bad_request_error_response_exception.rb +15 -15
  48. data/lib/advanced_billing/exceptions/refund_prepayment_base_errors_response_exception.rb +15 -15
  49. data/lib/advanced_billing/exceptions/single_error_response_exception.rb +15 -15
  50. data/lib/advanced_billing/exceptions/single_string_error_response_exception.rb +15 -15
  51. data/lib/advanced_billing/exceptions/subscription_add_coupon_error_exception.rb +15 -15
  52. data/lib/advanced_billing/exceptions/subscription_component_allocation_error_exception.rb +15 -15
  53. data/lib/advanced_billing/exceptions/subscription_group_create_error_response_exception.rb +15 -15
  54. data/lib/advanced_billing/exceptions/subscription_group_signup_error_response_exception.rb +15 -15
  55. data/lib/advanced_billing/exceptions/subscription_group_update_error_response_exception.rb +15 -15
  56. data/lib/advanced_billing/exceptions/subscription_remove_coupon_errors_exception.rb +15 -15
  57. data/lib/advanced_billing/exceptions/subscriptions_mrr_error_response_exception.rb +15 -15
  58. data/lib/advanced_billing/exceptions/too_many_management_link_requests_error_exception.rb +15 -15
  59. data/lib/advanced_billing/models/activate_event_based_component.rb +84 -0
  60. data/lib/advanced_billing/models/{current_vault.rb → all_vaults.rb} +28 -7
  61. data/lib/advanced_billing/models/allocation.rb +1 -0
  62. data/lib/advanced_billing/models/allocation_preview_item.rb +1 -0
  63. data/lib/advanced_billing/models/apple_pay_payment_profile.rb +232 -0
  64. data/lib/advanced_billing/models/apple_pay_vault.rb +20 -0
  65. data/lib/advanced_billing/models/bank_account_attributes.rb +2 -0
  66. data/lib/advanced_billing/models/bank_account_payment_profile.rb +25 -20
  67. data/lib/advanced_billing/models/bank_account_vault.rb +19 -9
  68. data/lib/advanced_billing/models/change_invoice_status_event_data.rb +6 -6
  69. data/lib/advanced_billing/models/component.rb +1 -0
  70. data/lib/advanced_billing/models/component_custom_price.rb +33 -14
  71. data/lib/advanced_billing/models/component_price_point_item.rb +3 -1
  72. data/lib/advanced_billing/models/create_component_price_point.rb +3 -1
  73. data/lib/advanced_billing/models/create_customer.rb +11 -1
  74. data/lib/advanced_billing/models/create_metafield.rb +2 -1
  75. data/lib/advanced_billing/models/create_or_update_product.rb +7 -4
  76. data/lib/advanced_billing/models/create_payment_profile.rb +1 -1
  77. data/lib/advanced_billing/models/create_prepaid_usage_component_price_point.rb +6 -5
  78. data/lib/advanced_billing/models/create_product_price_point.rb +5 -3
  79. data/lib/advanced_billing/models/create_subscription.rb +27 -25
  80. data/lib/advanced_billing/models/credit_card_payment_profile.rb +17 -16
  81. data/lib/advanced_billing/models/credit_card_vault.rb +117 -0
  82. data/lib/advanced_billing/models/credit_note.rb +2 -2
  83. data/lib/advanced_billing/models/customer.rb +11 -1
  84. data/lib/advanced_billing/models/customer_attributes.rb +12 -1
  85. data/lib/advanced_billing/models/ebb_component.rb +1 -0
  86. data/lib/advanced_billing/models/{extended_interval_unit.rb → expiration_interval_unit.rb} +4 -4
  87. data/lib/advanced_billing/models/full_subscription_group_response.rb +65 -50
  88. data/lib/advanced_billing/models/get_one_time_token_payment_profile.rb +1 -1
  89. data/lib/advanced_billing/models/invoice.rb +19 -9
  90. data/lib/advanced_billing/models/invoice_consolidation_level.rb +2 -2
  91. data/lib/advanced_billing/models/invoice_refund.rb +13 -1
  92. data/lib/advanced_billing/models/invoice_status.rb +2 -2
  93. data/lib/advanced_billing/models/invoice_tax.rb +29 -0
  94. data/lib/advanced_billing/models/invoice_tax_component_breakout.rb +101 -1
  95. data/lib/advanced_billing/models/issue_invoice_event_data.rb +6 -6
  96. data/lib/advanced_billing/models/metered_component.rb +4 -3
  97. data/lib/advanced_billing/models/offer_item.rb +3 -1
  98. data/lib/advanced_billing/models/on_off_component.rb +3 -2
  99. data/lib/advanced_billing/models/paid_invoice.rb +2 -2
  100. data/lib/advanced_billing/models/pay_pal_vault.rb +29 -0
  101. data/lib/advanced_billing/models/payment_profile_attributes.rb +5 -5
  102. data/lib/advanced_billing/models/payment_profile_response.rb +3 -3
  103. data/lib/advanced_billing/models/payment_type.rb +4 -1
  104. data/lib/advanced_billing/models/paypal_payment_profile.rb +242 -0
  105. data/lib/advanced_billing/models/prepaid_usage_component.rb +5 -4
  106. data/lib/advanced_billing/models/product.rb +2 -2
  107. data/lib/advanced_billing/models/product_price_point.rb +2 -2
  108. data/lib/advanced_billing/models/proforma_invoice.rb +6 -6
  109. data/lib/advanced_billing/models/quantity_based_component.rb +4 -3
  110. data/lib/advanced_billing/models/refund_invoice_event_data.rb +4 -4
  111. data/lib/advanced_billing/models/resent_invitation.rb +36 -0
  112. data/lib/advanced_billing/models/subscription.rb +13 -10
  113. data/lib/advanced_billing/models/subscription_component.rb +1 -0
  114. data/lib/advanced_billing/models/subscription_component_subscription.rb +26 -20
  115. data/lib/advanced_billing/models/subscription_custom_price.rb +5 -2
  116. data/lib/advanced_billing/models/subscription_group_bank_account.rb +2 -0
  117. data/lib/advanced_billing/models/subscription_group_credit_card.rb +1 -1
  118. data/lib/advanced_billing/models/subscription_group_signup_response.rb +39 -30
  119. data/lib/advanced_billing/models/subscription_state.rb +30 -30
  120. data/lib/advanced_billing/models/tax_configuration.rb +1 -2
  121. data/lib/advanced_billing/models/update_component_price_point.rb +3 -1
  122. data/lib/advanced_billing/models/update_customer.rb +12 -1
  123. data/lib/advanced_billing/models/update_payment_profile.rb +1 -1
  124. data/lib/advanced_billing/utilities/file_wrapper.rb +9 -9
  125. data/lib/advanced_billing/utilities/union_type_lookup.rb +17 -3
  126. data/lib/advanced_billing.rb +10 -4
  127. metadata +16 -10
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [String]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? hash['errors'] : SKIP
30
30
  end
31
31
  end
@@ -23,21 +23,21 @@ module AdvancedBilling
23
23
 
24
24
  # TODO: Write general description for this method
25
25
  # @return [Array[String]]
26
- attr_accessor :subscription
27
-
28
- # The constructor.
29
- # @param [String] The reason for raising an exception.
30
- # @param [HttpResponse] The HttpReponse of the API call.
31
- def initialize(reason, response)
32
- super(reason, response)
33
- hash = APIHelper.json_deserialize(@response.raw_body)
34
- unbox(hash)
35
- end
36
-
37
- # Populates this object by extracting properties from a hash.
38
- # @param [Hash] The deserialized response sent by the server in the
39
- # response body.
40
- def unbox(hash)
26
+ attr_accessor :subscription
27
+
28
+ # The constructor.
29
+ # @param [String] The reason for raising an exception.
30
+ # @param [HttpResponse] The HttpReponse of the API call.
31
+ def initialize(reason, response)
32
+ super(reason, response)
33
+ hash = APIHelper.json_deserialize(@response.raw_body)
34
+ unbox(hash)
35
+ end
36
+
37
+ # Populates this object by extracting properties from a hash.
38
+ # @param [Hash] The deserialized response sent by the server in the
39
+ # response body.
40
+ def unbox(hash)
41
41
  @codes = hash.key?('codes') ? hash['codes'] : SKIP
42
42
  @coupon_code = hash.key?('coupon_code') ? hash['coupon_code'] : SKIP
43
43
  @coupon_codes = hash.key?('coupon_codes') ? hash['coupon_codes'] : SKIP
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Array[SubscriptionComponentAllocationErrorItem]]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  # Parameter is an array, so we need to iterate through it
30
30
  @errors = nil
31
31
  unless hash['errors'].nil?
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Object]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = hash.key?('errors') ? APIHelper.deserialize_union_type(
30
30
  UnionTypeLookUp.get(:SubscriptionGroupCreateErrorResponseErrors), hash['errors']
31
31
  ) : nil
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [SubscriptionGroupSignupError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = SubscriptionGroupSignupError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [SubscriptionGroupUpdateError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = SubscriptionGroupUpdateError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [Array[String]]
14
- attr_accessor :subscription
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :subscription
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @subscription = hash.key?('subscription') ? hash['subscription'] : nil
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [AttributeError]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = AttributeError.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -11,21 +11,21 @@ module AdvancedBilling
11
11
 
12
12
  # TODO: Write general description for this method
13
13
  # @return [TooManyManagementLinkRequests]
14
- attr_accessor :errors
15
-
16
- # The constructor.
17
- # @param [String] The reason for raising an exception.
18
- # @param [HttpResponse] The HttpReponse of the API call.
19
- def initialize(reason, response)
20
- super(reason, response)
21
- hash = APIHelper.json_deserialize(@response.raw_body)
22
- unbox(hash)
23
- end
24
-
25
- # Populates this object by extracting properties from a hash.
26
- # @param [Hash] The deserialized response sent by the server in the
27
- # response body.
28
- def unbox(hash)
14
+ attr_accessor :errors
15
+
16
+ # The constructor.
17
+ # @param [String] The reason for raising an exception.
18
+ # @param [HttpResponse] The HttpReponse of the API call.
19
+ def initialize(reason, response)
20
+ super(reason, response)
21
+ hash = APIHelper.json_deserialize(@response.raw_body)
22
+ unbox(hash)
23
+ end
24
+
25
+ # Populates this object by extracting properties from a hash.
26
+ # @param [Hash] The deserialized response sent by the server in the
27
+ # response body.
28
+ def unbox(hash)
29
29
  @errors = TooManyManagementLinkRequests.from_hash(hash['errors']) if hash['errors']
30
30
  end
31
31
  end
@@ -0,0 +1,84 @@
1
+ # advanced_billing
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module AdvancedBilling
7
+ # ActivateEventBasedComponent Model.
8
+ class ActivateEventBasedComponent < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The Chargify id of the price point
13
+ # @return [Integer]
14
+ attr_accessor :price_point_id
15
+
16
+ # This attribute is particularly useful when you need to align billing
17
+ # events for different components on distinct schedules within a
18
+ # subscription. Please note this only works for site with Multifrequency
19
+ # enabled
20
+ # @return [BillingSchedule]
21
+ attr_accessor :billing_schedule
22
+
23
+ # Create or update custom pricing unique to the subscription. Used in place
24
+ # of `price_point_id`.
25
+ # @return [ComponentCustomPrice]
26
+ attr_accessor :custom_price
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['price_point_id'] = 'price_point_id'
32
+ @_hash['billing_schedule'] = 'billing_schedule'
33
+ @_hash['custom_price'] = 'custom_price'
34
+ @_hash
35
+ end
36
+
37
+ # An array for optional fields
38
+ def self.optionals
39
+ %w[
40
+ price_point_id
41
+ billing_schedule
42
+ custom_price
43
+ ]
44
+ end
45
+
46
+ # An array for nullable fields
47
+ def self.nullables
48
+ []
49
+ end
50
+
51
+ def initialize(price_point_id: SKIP, billing_schedule: SKIP,
52
+ custom_price: SKIP, additional_properties: {})
53
+ @price_point_id = price_point_id unless price_point_id == SKIP
54
+ @billing_schedule = billing_schedule unless billing_schedule == SKIP
55
+ @custom_price = custom_price unless custom_price == SKIP
56
+
57
+ # Add additional model properties to the instance.
58
+ additional_properties.each do |_name, _value|
59
+ instance_variable_set("@#{_name}", _value)
60
+ end
61
+ end
62
+
63
+ # Creates an instance of the object from a hash.
64
+ def self.from_hash(hash)
65
+ return nil unless hash
66
+
67
+ # Extract variables from the hash.
68
+ price_point_id =
69
+ hash.key?('price_point_id') ? hash['price_point_id'] : SKIP
70
+ billing_schedule = BillingSchedule.from_hash(hash['billing_schedule']) if
71
+ hash['billing_schedule']
72
+ custom_price = ComponentCustomPrice.from_hash(hash['custom_price']) if hash['custom_price']
73
+
74
+ # Clean out expected properties from Hash.
75
+ names.each_value { |k| hash.delete(k) }
76
+
77
+ # Create object from extracted values.
78
+ ActivateEventBasedComponent.new(price_point_id: price_point_id,
79
+ billing_schedule: billing_schedule,
80
+ custom_price: custom_price,
81
+ additional_properties: hash)
82
+ end
83
+ end
84
+ end
@@ -6,17 +6,14 @@
6
6
  module AdvancedBilling
7
7
  # The vault that stores the payment profile with the provided `vault_token`.
8
8
  # Use `bogus` for testing.
9
- class CurrentVault
10
- CURRENT_VAULT = [
9
+ class AllVaults
10
+ ALL_VAULTS = [
11
11
  # TODO: Write general description for ADYEN
12
12
  ADYEN = 'adyen'.freeze,
13
13
 
14
14
  # TODO: Write general description for AUTHORIZENET
15
15
  AUTHORIZENET = 'authorizenet'.freeze,
16
16
 
17
- # TODO: Write general description for AVALARA
18
- AVALARA = 'avalara'.freeze,
19
-
20
17
  # TODO: Write general description for BEANSTREAM
21
18
  BEANSTREAM = 'beanstream'.freeze,
22
19
 
@@ -26,6 +23,9 @@ module AdvancedBilling
26
23
  # TODO: Write general description for BOGUS
27
24
  BOGUS = 'bogus'.freeze,
28
25
 
26
+ # TODO: Write general description for BRAINTREE1
27
+ BRAINTREE1 = 'braintree1'.freeze,
28
+
29
29
  # TODO: Write general description for BRAINTREE_BLUE
30
30
  BRAINTREE_BLUE = 'braintree_blue'.freeze,
31
31
 
@@ -41,6 +41,9 @@ module AdvancedBilling
41
41
  # TODO: Write general description for EWAY
42
42
  EWAY = 'eway'.freeze,
43
43
 
44
+ # TODO: Write general description for EWAY_RAPID
45
+ EWAY_RAPID = 'eway_rapid'.freeze,
46
+
44
47
  # TODO: Write general description for EWAY_RAPID_STD
45
48
  EWAY_RAPID_STD = 'eway_rapid_std'.freeze,
46
49
 
@@ -59,6 +62,9 @@ module AdvancedBilling
59
62
  # TODO: Write general description for MAXIO_PAYMENTS
60
63
  MAXIO_PAYMENTS = 'maxio_payments'.freeze,
61
64
 
65
+ # TODO: Write general description for MAXP
66
+ MAXP = 'maxp'.freeze,
67
+
62
68
  # TODO: Write general description for MODUSLINK
63
69
  MODUSLINK = 'moduslink'.freeze,
64
70
 
@@ -74,12 +80,24 @@ module AdvancedBilling
74
80
  # TODO: Write general description for PAYMENT_EXPRESS
75
81
  PAYMENT_EXPRESS = 'payment_express'.freeze,
76
82
 
83
+ # TODO: Write general description for PAYMILL
84
+ PAYMILL = 'paymill'.freeze,
85
+
86
+ # TODO: Write general description for PAYPAL
87
+ PAYPAL = 'paypal'.freeze,
88
+
89
+ # TODO: Write general description for PAYPAL_COMPLETE
90
+ PAYPAL_COMPLETE = 'paypal_complete'.freeze,
91
+
77
92
  # TODO: Write general description for PIN
78
93
  PIN = 'pin'.freeze,
79
94
 
80
95
  # TODO: Write general description for SQUARE
81
96
  SQUARE = 'square'.freeze,
82
97
 
98
+ # TODO: Write general description for STRIPE
99
+ STRIPE = 'stripe'.freeze,
100
+
83
101
  # TODO: Write general description for STRIPE_CONNECT
84
102
  STRIPE_CONNECT = 'stripe_connect'.freeze,
85
103
 
@@ -87,13 +105,16 @@ module AdvancedBilling
87
105
  TRUST_COMMERCE = 'trust_commerce'.freeze,
88
106
 
89
107
  # TODO: Write general description for UNIPAAS
90
- UNIPAAS = 'unipaas'.freeze
108
+ UNIPAAS = 'unipaas'.freeze,
109
+
110
+ # TODO: Write general description for WIRECARD
111
+ WIRECARD = 'wirecard'.freeze
91
112
  ].freeze
92
113
 
93
114
  def self.validate(value)
94
115
  return false if value.nil?
95
116
 
96
- CURRENT_VAULT.include?(value)
117
+ ALL_VAULTS.include?(value)
97
118
  end
98
119
  end
99
120
  end
@@ -210,6 +210,7 @@ module AdvancedBilling
210
210
  %w[
211
211
  component_handle
212
212
  memo
213
+ interval_unit
213
214
  upgrade_charge
214
215
  downgrade_credit
215
216
  payment
@@ -155,6 +155,7 @@ module AdvancedBilling
155
155
  timestamp
156
156
  upgrade_charge
157
157
  downgrade_credit
158
+ interval_unit
158
159
  component_handle
159
160
  ]
160
161
  end