tremendous_ruby 5.29.0 → 6.0.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/lib/tremendous/api/tremendous_api.rb +52 -49
- data/lib/tremendous/api_client.rb +7 -3
- data/lib/tremendous/api_error.rb +1 -1
- data/lib/tremendous/api_model_base.rb +88 -0
- data/lib/tremendous/configuration.rb +1 -1
- data/lib/tremendous/models/allow_email.rb +2 -75
- data/lib/tremendous/models/allow_ip.rb +2 -75
- data/lib/tremendous/models/balance_transaction.rb +13 -76
- data/lib/tremendous/models/balance_transaction_order.rb +2 -75
- data/lib/tremendous/models/balance_transaction_order_payment.rb +2 -75
- data/lib/tremendous/models/base_order_for_create.rb +2 -75
- data/lib/tremendous/models/campaign.rb +4 -77
- data/lib/tremendous/models/campaign_base.rb +4 -77
- data/lib/tremendous/models/campaign_base_products_inner.rb +102 -0
- data/lib/tremendous/models/channel.rb +1 -1
- data/lib/tremendous/models/connected_organization.rb +2 -75
- data/lib/tremendous/models/connected_organization_member.rb +2 -75
- data/lib/tremendous/models/connected_organization_member_member.rb +2 -75
- data/lib/tremendous/models/connected_organization_member_response.rb +164 -0
- data/lib/tremendous/models/connected_organization_member_response_connected_organization_member.rb +273 -0
- data/lib/tremendous/models/connected_organization_member_session.rb +2 -75
- data/lib/tremendous/models/connected_organization_member_session_response.rb +164 -0
- data/lib/tremendous/models/connected_organization_member_session_response_connected_organization_member_session.rb +310 -0
- data/lib/tremendous/models/connected_organization_organization.rb +2 -75
- data/lib/tremendous/models/{generate_reward_link403_response.rb → connected_organization_response.rb} +20 -103
- data/lib/tremendous/models/connected_organization_response_connected_organization.rb +240 -0
- data/lib/tremendous/models/create_api_key200_response.rb +2 -75
- data/lib/tremendous/models/create_api_key_request.rb +2 -75
- data/lib/tremendous/models/create_campaign200_response.rb +2 -75
- data/lib/tremendous/models/create_campaign_request.rb +4 -77
- data/lib/tremendous/models/create_connected_organization200_response.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_member200_response.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_member_request.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_member_session_request.rb +2 -75
- data/lib/tremendous/models/create_connected_organization_request.rb +3 -76
- data/lib/tremendous/models/create_connected_organization_request_kyb_prefill.rb +13 -76
- data/lib/tremendous/models/create_field.rb +2 -75
- data/lib/tremendous/models/create_field200_response.rb +2 -75
- data/lib/tremendous/models/create_field_request.rb +2 -75
- data/lib/tremendous/models/create_field_request_data.rb +2 -75
- data/lib/tremendous/models/create_invoice200_response.rb +2 -75
- data/lib/tremendous/models/create_invoice_request.rb +4 -77
- data/lib/tremendous/models/create_member.rb +2 -75
- data/lib/tremendous/models/create_member200_response.rb +2 -75
- data/lib/tremendous/models/create_member_request.rb +2 -75
- data/lib/tremendous/models/create_order200_response.rb +2 -75
- data/lib/tremendous/models/create_order200_response_order.rb +3 -76
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +3 -76
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +2 -75
- data/lib/tremendous/models/create_order_request.rb +3 -4
- data/lib/tremendous/models/create_organization.rb +2 -75
- data/lib/tremendous/models/create_organization200_response.rb +2 -75
- data/lib/tremendous/models/create_organization200_response_organization.rb +2 -75
- data/lib/tremendous/models/create_organization_for_response.rb +2 -75
- data/lib/tremendous/models/create_organization_properties.rb +2 -75
- data/lib/tremendous/models/create_organization_request.rb +2 -75
- data/lib/tremendous/models/create_organization_request_copy_settings.rb +2 -75
- data/lib/tremendous/models/create_organization_response.rb +147 -0
- data/lib/tremendous/models/create_organization_response_organization.rb +282 -0
- data/lib/tremendous/models/create_report200_response.rb +2 -75
- data/lib/tremendous/models/create_report200_response_report.rb +2 -75
- data/lib/tremendous/models/create_report_request.rb +2 -75
- data/lib/tremendous/models/create_report_request_filters.rb +2 -75
- data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +2 -75
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +2 -75
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +2 -75
- data/lib/tremendous/models/create_topup200_response.rb +2 -75
- data/lib/tremendous/models/create_topup_request.rb +2 -75
- data/lib/tremendous/models/create_webhook200_response.rb +2 -75
- data/lib/tremendous/models/create_webhook_request.rb +2 -75
- data/lib/tremendous/models/currency_codes.rb +2 -3
- data/lib/tremendous/models/custom_field.rb +2 -75
- data/lib/tremendous/models/delivery_details.rb +2 -75
- data/lib/tremendous/models/delivery_details_with_link.rb +2 -75
- data/lib/tremendous/models/delivery_metadata.rb +2 -75
- data/lib/tremendous/models/delivery_method.rb +1 -1
- data/lib/tremendous/models/delivery_status.rb +1 -1
- data/lib/tremendous/models/error_model.rb +2 -75
- data/lib/tremendous/models/field.rb +2 -75
- data/lib/tremendous/models/fraud_config_allow_email.rb +2 -75
- data/lib/tremendous/models/fraud_config_country.rb +2 -75
- data/lib/tremendous/models/fraud_config_country_update_list.rb +2 -75
- data/lib/tremendous/models/fraud_config_ip.rb +2 -75
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +2 -75
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +2 -75
- data/lib/tremendous/models/fraud_config_review_email.rb +2 -75
- data/lib/tremendous/models/fraud_config_review_vpn.rb +2 -75
- data/lib/tremendous/models/fraud_generic_response.rb +2 -75
- data/lib/tremendous/models/fraud_review.rb +5 -78
- data/lib/tremendous/models/fraud_review_base.rb +5 -78
- data/lib/tremendous/models/fraud_review_geo.rb +2 -75
- data/lib/tremendous/models/fraud_review_list_item.rb +5 -78
- data/lib/tremendous/models/fraud_review_reason.rb +7 -2
- data/lib/tremendous/models/fraud_review_redemption_method.rb +6 -2
- data/lib/tremendous/models/fraud_review_related_rewards.rb +2 -75
- data/lib/tremendous/models/fraud_review_risk.rb +1 -1
- data/lib/tremendous/models/fraud_review_status.rb +1 -1
- data/lib/tremendous/models/fraud_rule200_response.rb +2 -75
- data/lib/tremendous/models/fraud_rule_request.rb +2 -75
- data/lib/tremendous/models/fraud_rule_request_config.rb +3 -4
- data/lib/tremendous/models/fraud_rule_type.rb +1 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +2 -75
- data/lib/tremendous/models/funding_source.rb +3 -76
- data/lib/tremendous/models/generate_reward_link200_response.rb +2 -75
- data/lib/tremendous/models/generate_reward_link200_response_reward.rb +2 -75
- data/lib/tremendous/models/get_fraud_review200_response.rb +2 -75
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +4 -77
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +2 -75
- data/lib/tremendous/models/get_funding_source200_response.rb +2 -75
- data/lib/tremendous/models/get_member200_response.rb +2 -75
- data/lib/tremendous/models/get_member200_response_member.rb +2 -75
- data/lib/tremendous/models/get_member200_response_member_events_inner.rb +2 -75
- data/lib/tremendous/models/get_order200_response.rb +2 -75
- data/lib/tremendous/models/get_organization200_response.rb +2 -75
- data/lib/tremendous/models/get_product_response.rb +2 -75
- data/lib/tremendous/models/get_reward200_response.rb +2 -75
- data/lib/tremendous/models/inline_object.rb +2 -75
- data/lib/tremendous/models/invoice.rb +4 -77
- data/lib/tremendous/models/invoice_response.rb +164 -0
- data/lib/tremendous/models/invoice_response_invoice.rb +370 -0
- data/lib/tremendous/models/list_balance_transactions200_response.rb +2 -75
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +13 -76
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +2 -75
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +2 -75
- data/lib/tremendous/models/list_campaigns200_response.rb +2 -75
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +4 -77
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +2 -75
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +2 -75
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_products_inner.rb +102 -0
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +2 -75
- data/lib/tremendous/models/list_connected_organization_members200_response.rb +2 -75
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +2 -75
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +2 -75
- data/lib/tremendous/models/list_connected_organizations200_response.rb +2 -75
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +2 -75
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +2 -75
- data/lib/tremendous/models/list_fields200_response.rb +2 -75
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +2 -75
- data/lib/tremendous/models/list_fields200_response_fields_inner_data.rb +2 -75
- data/lib/tremendous/models/list_forex_response.rb +2 -75
- data/lib/tremendous/models/list_fraud_reviews200_response.rb +2 -75
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +4 -77
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner_geo.rb +2 -75
- data/lib/tremendous/models/list_fraud_rules200_response.rb +2 -75
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +2 -75
- data/lib/tremendous/models/list_funding_sources200_response.rb +2 -75
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +3 -76
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +17 -78
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +4 -75
- data/lib/tremendous/models/list_invoices200_response.rb +2 -75
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +4 -77
- data/lib/tremendous/models/list_members200_response.rb +2 -75
- data/lib/tremendous/models/list_members200_response_members_inner.rb +2 -75
- data/lib/tremendous/models/list_orders200_response.rb +2 -75
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +3 -76
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +2 -75
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +2 -75
- data/lib/tremendous/models/list_organizations200_response.rb +2 -75
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +2 -75
- data/lib/tremendous/models/list_products_response.rb +2 -75
- data/lib/tremendous/models/list_products_response_products_inner.rb +5 -78
- data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +2 -75
- data/lib/tremendous/models/list_products_response_products_inner_documents.rb +2 -75
- data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +2 -75
- data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +61 -81
- data/lib/tremendous/models/list_rewards200_response.rb +2 -75
- data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +3 -76
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +2 -75
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +2 -75
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +2 -75
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +3 -76
- data/lib/tremendous/models/list_rewards401_response.rb +2 -75
- data/lib/tremendous/models/list_rewards401_response_errors.rb +2 -75
- data/lib/tremendous/models/list_roles200_response.rb +2 -75
- data/lib/tremendous/models/list_roles200_response_roles_inner.rb +2 -75
- data/lib/tremendous/models/list_topups200_response.rb +2 -75
- data/lib/tremendous/models/list_topups200_response_topups_inner.rb +3 -76
- data/lib/tremendous/models/list_webhook_events200_response.rb +2 -75
- data/lib/tremendous/models/list_webhooks200_response.rb +2 -75
- data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +2 -75
- data/lib/tremendous/models/member.rb +2 -75
- data/lib/tremendous/models/member_base.rb +2 -75
- data/lib/tremendous/models/member_with_events.rb +2 -75
- data/lib/tremendous/models/member_without_events.rb +2 -75
- data/lib/tremendous/models/{fraud_rule400_response.rb → member_without_events_response.rb} +20 -103
- data/lib/tremendous/models/member_without_events_response_member.rb +311 -0
- data/lib/tremendous/models/order.rb +4 -77
- data/lib/tremendous/models/order_base.rb +3 -76
- data/lib/tremendous/models/order_base_payment.rb +2 -75
- data/lib/tremendous/models/order_status.rb +1 -1
- data/lib/tremendous/models/order_with_link.rb +3 -76
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +3 -76
- data/lib/tremendous/models/order_without_link.rb +4 -77
- data/lib/tremendous/models/organization.rb +2 -75
- data/lib/tremendous/models/organization_response.rb +147 -0
- data/lib/tremendous/models/organization_response_organization.rb +285 -0
- data/lib/tremendous/models/payment_details.rb +2 -75
- data/lib/tremendous/models/payment_details_refund.rb +2 -75
- data/lib/tremendous/models/payout.rb +2 -75
- data/lib/tremendous/models/product.rb +5 -78
- data/lib/tremendous/models/product_documents.rb +2 -75
- data/lib/tremendous/models/recipient.rb +2 -75
- data/lib/tremendous/models/refund_details.rb +2 -75
- data/lib/tremendous/models/report.rb +2 -75
- data/lib/tremendous/models/{delete_fraud_rule200_response.rb → report_response.rb} +25 -89
- data/lib/tremendous/models/resend_reward_request.rb +2 -75
- data/lib/tremendous/models/review_country.rb +2 -75
- data/lib/tremendous/models/review_country1.rb +2 -75
- data/lib/tremendous/models/review_email.rb +2 -75
- data/lib/tremendous/models/review_ip.rb +2 -75
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +2 -75
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +2 -75
- data/lib/tremendous/models/review_vpn.rb +2 -75
- data/lib/tremendous/models/reward.rb +3 -76
- data/lib/tremendous/models/reward_base.rb +3 -76
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +2 -75
- data/lib/tremendous/models/reward_for_order_create.rb +3 -76
- data/lib/tremendous/models/reward_link.rb +2 -75
- data/lib/tremendous/models/{inline_object1.rb → reward_link_response.rb} +5 -78
- data/lib/tremendous/models/reward_link_response_reward.rb +180 -0
- data/lib/tremendous/models/reward_response.rb +164 -0
- data/lib/tremendous/models/{order_without_link_rewards_inner.rb → reward_response_reward.rb} +5 -78
- data/lib/tremendous/models/reward_token.rb +2 -75
- data/lib/tremendous/models/reward_token_response.rb +164 -0
- data/lib/tremendous/models/{inline_object1_reward.rb → reward_token_response_reward.rb} +4 -77
- data/lib/tremendous/models/reward_value.rb +3 -76
- data/lib/tremendous/models/reward_with_link.rb +3 -76
- data/lib/tremendous/models/reward_with_link_delivery.rb +2 -75
- data/lib/tremendous/models/reward_without_link.rb +3 -76
- data/lib/tremendous/models/reward_without_link_delivery.rb +2 -75
- data/lib/tremendous/models/role.rb +2 -75
- data/lib/tremendous/models/simulate_webhook_request.rb +2 -75
- data/lib/tremendous/models/single_reward_order.rb +2 -75
- data/lib/tremendous/models/single_reward_order_payment.rb +2 -75
- data/lib/tremendous/models/single_reward_order_reward.rb +3 -76
- data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +2 -75
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +2 -75
- data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +2 -75
- data/lib/tremendous/models/single_reward_order_with_link.rb +2 -75
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +3 -76
- data/lib/tremendous/models/single_reward_order_without_link.rb +2 -75
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +4 -77
- data/lib/tremendous/models/topup.rb +3 -76
- data/lib/tremendous/models/topup_create_request.rb +2 -75
- data/lib/tremendous/models/topup_response.rb +147 -0
- data/lib/tremendous/models/update_campaign.rb +4 -77
- data/lib/tremendous/models/update_campaign_request.rb +4 -77
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +2 -75
- data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +7 -8
- data/lib/tremendous/models/update_member.rb +2 -75
- data/lib/tremendous/models/update_member_request.rb +2 -75
- data/lib/tremendous/models/webhook.rb +2 -75
- data/lib/tremendous/models/webhook_post.rb +2 -75
- data/lib/tremendous/models/webhook_response.rb +147 -0
- data/lib/tremendous/models/{update_fraud_rule_list200_response.rb → webhook_response_webhook.rb} +47 -94
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +28 -15
- metadata +29 -16
- data/lib/tremendous/models/allow_email1.rb +0 -250
- data/lib/tremendous/models/allow_ip1.rb +0 -250
- data/lib/tremendous/models/fraud_rule422_response.rb +0 -247
- data/lib/tremendous/models/list_rewards429_response.rb +0 -247
- data/lib/tremendous/models/resend_reward422_response.rb +0 -247
- data/lib/tremendous/models/review_email1.rb +0 -255
- data/lib/tremendous/models/review_ip1.rb +0 -250
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.25.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# An active fraud rule
|
|
18
|
-
class ListFraudRules200ResponseFraudRulesInner
|
|
18
|
+
class ListFraudRules200ResponseFraudRulesInner < ApiModelBase
|
|
19
19
|
# * `review_country` - Flags when the recipient's IP country matches the criteria in the rule * `review_ip` - Flags when recipient's IP matches one in the list * `review_email` - Flags when the recipient's email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config. The amount is denominated in the organization's currency. * `review_multiple_emails` - Flags when recipient's device or account has multiple emails associated * `review_vpn` - Flags when VPN or proxy use is suspected. Can be configured to exclude Apple Private Relay. * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient's IP matches one in the list * `allow_email` - Releases a reward when the recipient's email matches one in the list
|
|
20
20
|
attr_accessor :rule_type
|
|
21
21
|
|
|
@@ -173,61 +173,6 @@ module Tremendous
|
|
|
173
173
|
new(transformed_hash)
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
# Deserializes the data based on type
|
|
177
|
-
# @param string type Data type
|
|
178
|
-
# @param string value Value to be deserialized
|
|
179
|
-
# @return [Object] Deserialized data
|
|
180
|
-
def self._deserialize(type, value)
|
|
181
|
-
case type.to_sym
|
|
182
|
-
when :Time
|
|
183
|
-
Time.parse(value)
|
|
184
|
-
when :Date
|
|
185
|
-
Date.parse(value)
|
|
186
|
-
when :String
|
|
187
|
-
value.to_s
|
|
188
|
-
when :Integer
|
|
189
|
-
value.to_i
|
|
190
|
-
when :Float
|
|
191
|
-
value.to_f
|
|
192
|
-
when :Boolean
|
|
193
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
194
|
-
true
|
|
195
|
-
else
|
|
196
|
-
false
|
|
197
|
-
end
|
|
198
|
-
when :Object
|
|
199
|
-
# generic object (usually a Hash), return directly
|
|
200
|
-
value
|
|
201
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
202
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
203
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
204
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
205
|
-
k_type = Regexp.last_match[:k_type]
|
|
206
|
-
v_type = Regexp.last_match[:v_type]
|
|
207
|
-
{}.tap do |hash|
|
|
208
|
-
value.each do |k, v|
|
|
209
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
else # model
|
|
213
|
-
# models (e.g. Pet) or oneOf
|
|
214
|
-
klass = Tremendous.const_get(type)
|
|
215
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
216
|
-
end
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# Returns the string representation of the object
|
|
220
|
-
# @return [String] String presentation of the object
|
|
221
|
-
def to_s
|
|
222
|
-
to_hash.to_s
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
226
|
-
# @return [Hash] Returns the object in the form of hash
|
|
227
|
-
def to_body
|
|
228
|
-
to_hash
|
|
229
|
-
end
|
|
230
|
-
|
|
231
176
|
# Returns the object in the form of hash
|
|
232
177
|
# @return [Hash] Returns the object in the form of hash
|
|
233
178
|
def to_hash
|
|
@@ -244,24 +189,6 @@ module Tremendous
|
|
|
244
189
|
hash
|
|
245
190
|
end
|
|
246
191
|
|
|
247
|
-
# Outputs non-array value in the form of hash
|
|
248
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
249
|
-
# @param [Object] value Any valid value
|
|
250
|
-
# @return [Hash] Returns the value in the form of hash
|
|
251
|
-
def _to_hash(value)
|
|
252
|
-
if value.is_a?(Array)
|
|
253
|
-
value.compact.map { |v| _to_hash(v) }
|
|
254
|
-
elsif value.is_a?(Hash)
|
|
255
|
-
{}.tap do |hash|
|
|
256
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
257
|
-
end
|
|
258
|
-
elsif value.respond_to? :to_hash
|
|
259
|
-
value.to_hash
|
|
260
|
-
else
|
|
261
|
-
value
|
|
262
|
-
end
|
|
263
|
-
end
|
|
264
|
-
|
|
265
192
|
end
|
|
266
193
|
|
|
267
194
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.25.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
class ListFundingSources200Response
|
|
17
|
+
class ListFundingSources200Response < ApiModelBase
|
|
18
18
|
attr_accessor :funding_sources
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -145,61 +145,6 @@ module Tremendous
|
|
|
145
145
|
new(transformed_hash)
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
# Deserializes the data based on type
|
|
149
|
-
# @param string type Data type
|
|
150
|
-
# @param string value Value to be deserialized
|
|
151
|
-
# @return [Object] Deserialized data
|
|
152
|
-
def self._deserialize(type, value)
|
|
153
|
-
case type.to_sym
|
|
154
|
-
when :Time
|
|
155
|
-
Time.parse(value)
|
|
156
|
-
when :Date
|
|
157
|
-
Date.parse(value)
|
|
158
|
-
when :String
|
|
159
|
-
value.to_s
|
|
160
|
-
when :Integer
|
|
161
|
-
value.to_i
|
|
162
|
-
when :Float
|
|
163
|
-
value.to_f
|
|
164
|
-
when :Boolean
|
|
165
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
166
|
-
true
|
|
167
|
-
else
|
|
168
|
-
false
|
|
169
|
-
end
|
|
170
|
-
when :Object
|
|
171
|
-
# generic object (usually a Hash), return directly
|
|
172
|
-
value
|
|
173
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
174
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
175
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
176
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
177
|
-
k_type = Regexp.last_match[:k_type]
|
|
178
|
-
v_type = Regexp.last_match[:v_type]
|
|
179
|
-
{}.tap do |hash|
|
|
180
|
-
value.each do |k, v|
|
|
181
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
else # model
|
|
185
|
-
# models (e.g. Pet) or oneOf
|
|
186
|
-
klass = Tremendous.const_get(type)
|
|
187
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
188
|
-
end
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# Returns the string representation of the object
|
|
192
|
-
# @return [String] String presentation of the object
|
|
193
|
-
def to_s
|
|
194
|
-
to_hash.to_s
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
198
|
-
# @return [Hash] Returns the object in the form of hash
|
|
199
|
-
def to_body
|
|
200
|
-
to_hash
|
|
201
|
-
end
|
|
202
|
-
|
|
203
148
|
# Returns the object in the form of hash
|
|
204
149
|
# @return [Hash] Returns the object in the form of hash
|
|
205
150
|
def to_hash
|
|
@@ -216,24 +161,6 @@ module Tremendous
|
|
|
216
161
|
hash
|
|
217
162
|
end
|
|
218
163
|
|
|
219
|
-
# Outputs non-array value in the form of hash
|
|
220
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
221
|
-
# @param [Object] value Any valid value
|
|
222
|
-
# @return [Hash] Returns the value in the form of hash
|
|
223
|
-
def _to_hash(value)
|
|
224
|
-
if value.is_a?(Array)
|
|
225
|
-
value.compact.map { |v| _to_hash(v) }
|
|
226
|
-
elsif value.is_a?(Hash)
|
|
227
|
-
{}.tap do |hash|
|
|
228
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
229
|
-
end
|
|
230
|
-
elsif value.respond_to? :to_hash
|
|
231
|
-
value.to_hash
|
|
232
|
-
else
|
|
233
|
-
value
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
|
|
237
164
|
end
|
|
238
165
|
|
|
239
166
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.25.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,10 +15,10 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
#
|
|
18
|
-
class ListFundingSources200ResponseFundingSourcesInner
|
|
18
|
+
class ListFundingSources200ResponseFundingSourcesInner < ApiModelBase
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
# You can pay for rewards using different payment methods on Tremendous: <table> <thead> <tr> <th>Payment Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>balance</code></td> <td>Pre-funded balance in your Tremendous account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>bank_account</code></td> <td>Bank account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>credit_card</code></td> <td>Credit card to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>invoice</code></td> <td>Send rewards to recipients and pay by invoice.</td> </tr>
|
|
21
|
+
# You can pay for rewards using different payment methods on Tremendous: <table> <thead> <tr> <th>Payment Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>balance</code></td> <td>Pre-funded balance in your Tremendous account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>bank_account</code></td> <td>Bank account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>credit_card</code></td> <td>Credit card to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>invoice</code></td> <td>Send rewards to recipients and pay by invoice.</td> </tr> </tbody> </table>
|
|
22
22
|
attr_accessor :method
|
|
23
23
|
|
|
24
24
|
# Indicates which actions this funding source can perform. <table> <thead> <tr> <th>Permission</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>api_orders</code></td> <td>Usable for orders via API.</td> </tr> <tr> <td><code>dashboard_orders</code></td> <td>Usable for orders via Tremendous dashboard.</td> </tr> <tr> <td><code>balance_funding</code></td> <td>Usable to add funds to a balance (via dashboard or API).</td> </tr> </tbody> </table>
|
|
@@ -286,61 +286,6 @@ module Tremendous
|
|
|
286
286
|
new(transformed_hash)
|
|
287
287
|
end
|
|
288
288
|
|
|
289
|
-
# Deserializes the data based on type
|
|
290
|
-
# @param string type Data type
|
|
291
|
-
# @param string value Value to be deserialized
|
|
292
|
-
# @return [Object] Deserialized data
|
|
293
|
-
def self._deserialize(type, value)
|
|
294
|
-
case type.to_sym
|
|
295
|
-
when :Time
|
|
296
|
-
Time.parse(value)
|
|
297
|
-
when :Date
|
|
298
|
-
Date.parse(value)
|
|
299
|
-
when :String
|
|
300
|
-
value.to_s
|
|
301
|
-
when :Integer
|
|
302
|
-
value.to_i
|
|
303
|
-
when :Float
|
|
304
|
-
value.to_f
|
|
305
|
-
when :Boolean
|
|
306
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
307
|
-
true
|
|
308
|
-
else
|
|
309
|
-
false
|
|
310
|
-
end
|
|
311
|
-
when :Object
|
|
312
|
-
# generic object (usually a Hash), return directly
|
|
313
|
-
value
|
|
314
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
315
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
316
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
317
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
318
|
-
k_type = Regexp.last_match[:k_type]
|
|
319
|
-
v_type = Regexp.last_match[:v_type]
|
|
320
|
-
{}.tap do |hash|
|
|
321
|
-
value.each do |k, v|
|
|
322
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
323
|
-
end
|
|
324
|
-
end
|
|
325
|
-
else # model
|
|
326
|
-
# models (e.g. Pet) or oneOf
|
|
327
|
-
klass = Tremendous.const_get(type)
|
|
328
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
329
|
-
end
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
# Returns the string representation of the object
|
|
333
|
-
# @return [String] String presentation of the object
|
|
334
|
-
def to_s
|
|
335
|
-
to_hash.to_s
|
|
336
|
-
end
|
|
337
|
-
|
|
338
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
339
|
-
# @return [Hash] Returns the object in the form of hash
|
|
340
|
-
def to_body
|
|
341
|
-
to_hash
|
|
342
|
-
end
|
|
343
|
-
|
|
344
289
|
# Returns the object in the form of hash
|
|
345
290
|
# @return [Hash] Returns the object in the form of hash
|
|
346
291
|
def to_hash
|
|
@@ -357,24 +302,6 @@ module Tremendous
|
|
|
357
302
|
hash
|
|
358
303
|
end
|
|
359
304
|
|
|
360
|
-
# Outputs non-array value in the form of hash
|
|
361
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
362
|
-
# @param [Object] value Any valid value
|
|
363
|
-
# @return [Hash] Returns the value in the form of hash
|
|
364
|
-
def _to_hash(value)
|
|
365
|
-
if value.is_a?(Array)
|
|
366
|
-
value.compact.map { |v| _to_hash(v) }
|
|
367
|
-
elsif value.is_a?(Hash)
|
|
368
|
-
{}.tap do |hash|
|
|
369
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
370
|
-
end
|
|
371
|
-
elsif value.respond_to? :to_hash
|
|
372
|
-
value.to_hash
|
|
373
|
-
else
|
|
374
|
-
value
|
|
375
|
-
end
|
|
376
|
-
end
|
|
377
|
-
|
|
378
305
|
end
|
|
379
306
|
|
|
380
307
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.25.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
class ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
17
|
+
class ListFundingSources200ResponseFundingSourcesInnerMeta < ApiModelBase
|
|
18
18
|
# **Only exists for balance and commercial invoicing.** For balance: available amount denominated in `currency_code`. For commercial invoicing: available credit amount denominated in `currency_code`, calculated as (credit limit - outstanding balance). *Caution: In the \"list funding sources\" endpoint this value is cached and may not be up to date. Use the \"get funding source\" endpoint to get the most up to date value.*
|
|
19
19
|
attr_accessor :available_amount
|
|
20
20
|
|
|
@@ -75,12 +75,15 @@ module Tremendous
|
|
|
75
75
|
# **Only available when `method` is set to `invoice`.** Type of invoice account (e.g., commercial, pro_forma, prefunding_only)
|
|
76
76
|
attr_accessor :invoice_type
|
|
77
77
|
|
|
78
|
-
# **Only available when `method` is set to `invoice` and `invoice_type` is `commercial`.** Billing interval for commercial invoice generation (
|
|
78
|
+
# **Only available when `method` is set to `invoice` and `invoice_type` is `commercial`.** Billing interval for commercial invoice generation (daily, weekly, monthly, twice_monthly, or quarterly). Returns `null` for pro forma invoices.
|
|
79
79
|
attr_accessor :interval
|
|
80
80
|
|
|
81
|
-
# **Only available when `method` is set to `invoice` and `invoice_type` is `commercial`.** Day of the week when commercial invoices are generated (\"0\"=Sunday, \"1\"=Monday, etc.). Returns
|
|
81
|
+
# **Deprecated: Use `days_of_week` instead.** **Only available when `method` is set to `invoice` and `invoice_type` is `commercial`.** Day of the week when commercial invoices are generated (\"0\"=Sunday, \"1\"=Monday, etc.). Accounts with weekly commercial invoicing can have invoices generated on one or two days of the week. Returns the scheduled day when there is one day, and an empty string when there are two days and for non-weekly / pro forma invoices.
|
|
82
82
|
attr_accessor :day_of_week
|
|
83
83
|
|
|
84
|
+
# **Only available when `method` is set to `invoice` and `invoice_type` is `commercial`.** Days of the week when commercial invoices are generated (\"0\"=Sunday, \"1\"=Monday, etc.). Accounts with weekly commercial invoicing can have invoices generated on one or two days of the week. Returns an empty array for non-weekly and for pro forma invoices.
|
|
85
|
+
attr_accessor :days_of_week
|
|
86
|
+
|
|
84
87
|
# **Only available when `method` is set to `invoice`.** Net payment terms in days (e.g., \"30\" for Net 30)
|
|
85
88
|
attr_accessor :net
|
|
86
89
|
|
|
@@ -157,6 +160,7 @@ module Tremendous
|
|
|
157
160
|
:'invoice_type' => :'invoice_type',
|
|
158
161
|
:'interval' => :'interval',
|
|
159
162
|
:'day_of_week' => :'day_of_week',
|
|
163
|
+
:'days_of_week' => :'days_of_week',
|
|
160
164
|
:'net' => :'net',
|
|
161
165
|
:'company_name' => :'company_name',
|
|
162
166
|
:'address_1' => :'address_1',
|
|
@@ -205,6 +209,7 @@ module Tremendous
|
|
|
205
209
|
:'invoice_type' => :'String',
|
|
206
210
|
:'interval' => :'String',
|
|
207
211
|
:'day_of_week' => :'String',
|
|
212
|
+
:'days_of_week' => :'Array<String>',
|
|
208
213
|
:'net' => :'String',
|
|
209
214
|
:'company_name' => :'String',
|
|
210
215
|
:'address_1' => :'String',
|
|
@@ -340,6 +345,12 @@ module Tremendous
|
|
|
340
345
|
self.day_of_week = attributes[:'day_of_week']
|
|
341
346
|
end
|
|
342
347
|
|
|
348
|
+
if attributes.key?(:'days_of_week')
|
|
349
|
+
if (value = attributes[:'days_of_week']).is_a?(Array)
|
|
350
|
+
self.days_of_week = value
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
343
354
|
if attributes.key?(:'net')
|
|
344
355
|
self.net = attributes[:'net']
|
|
345
356
|
end
|
|
@@ -506,6 +517,7 @@ module Tremendous
|
|
|
506
517
|
invoice_type == o.invoice_type &&
|
|
507
518
|
interval == o.interval &&
|
|
508
519
|
day_of_week == o.day_of_week &&
|
|
520
|
+
days_of_week == o.days_of_week &&
|
|
509
521
|
net == o.net &&
|
|
510
522
|
company_name == o.company_name &&
|
|
511
523
|
address_1 == o.address_1 &&
|
|
@@ -527,7 +539,7 @@ module Tremendous
|
|
|
527
539
|
# Calculates hash code according to all attributes.
|
|
528
540
|
# @return [Integer] Hash code
|
|
529
541
|
def hash
|
|
530
|
-
[available_amount, available_cents, currency_code, pending_amount, pending_cents, credit_limit_amount, credit_limit_cents, accountholder_name, account_type, bank_name, account_number_mask, account_routing_mask, refundable, network, last4, expired, year, month, last_payment_failed_at, invoice_type, interval, day_of_week, net, company_name, address_1, address_2, city, state, zip, phone, emails, failure_details].hash
|
|
542
|
+
[available_amount, available_cents, currency_code, pending_amount, pending_cents, credit_limit_amount, credit_limit_cents, accountholder_name, account_type, bank_name, account_number_mask, account_routing_mask, refundable, network, last4, expired, year, month, last_payment_failed_at, invoice_type, interval, day_of_week, days_of_week, net, company_name, address_1, address_2, city, state, zip, phone, emails, failure_details].hash
|
|
531
543
|
end
|
|
532
544
|
|
|
533
545
|
# Builds the object from hash
|
|
@@ -553,61 +565,6 @@ module Tremendous
|
|
|
553
565
|
new(transformed_hash)
|
|
554
566
|
end
|
|
555
567
|
|
|
556
|
-
# Deserializes the data based on type
|
|
557
|
-
# @param string type Data type
|
|
558
|
-
# @param string value Value to be deserialized
|
|
559
|
-
# @return [Object] Deserialized data
|
|
560
|
-
def self._deserialize(type, value)
|
|
561
|
-
case type.to_sym
|
|
562
|
-
when :Time
|
|
563
|
-
Time.parse(value)
|
|
564
|
-
when :Date
|
|
565
|
-
Date.parse(value)
|
|
566
|
-
when :String
|
|
567
|
-
value.to_s
|
|
568
|
-
when :Integer
|
|
569
|
-
value.to_i
|
|
570
|
-
when :Float
|
|
571
|
-
value.to_f
|
|
572
|
-
when :Boolean
|
|
573
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
574
|
-
true
|
|
575
|
-
else
|
|
576
|
-
false
|
|
577
|
-
end
|
|
578
|
-
when :Object
|
|
579
|
-
# generic object (usually a Hash), return directly
|
|
580
|
-
value
|
|
581
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
582
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
583
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
584
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
585
|
-
k_type = Regexp.last_match[:k_type]
|
|
586
|
-
v_type = Regexp.last_match[:v_type]
|
|
587
|
-
{}.tap do |hash|
|
|
588
|
-
value.each do |k, v|
|
|
589
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
590
|
-
end
|
|
591
|
-
end
|
|
592
|
-
else # model
|
|
593
|
-
# models (e.g. Pet) or oneOf
|
|
594
|
-
klass = Tremendous.const_get(type)
|
|
595
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
596
|
-
end
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
# Returns the string representation of the object
|
|
600
|
-
# @return [String] String presentation of the object
|
|
601
|
-
def to_s
|
|
602
|
-
to_hash.to_s
|
|
603
|
-
end
|
|
604
|
-
|
|
605
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
606
|
-
# @return [Hash] Returns the object in the form of hash
|
|
607
|
-
def to_body
|
|
608
|
-
to_hash
|
|
609
|
-
end
|
|
610
|
-
|
|
611
568
|
# Returns the object in the form of hash
|
|
612
569
|
# @return [Hash] Returns the object in the form of hash
|
|
613
570
|
def to_hash
|
|
@@ -624,24 +581,6 @@ module Tremendous
|
|
|
624
581
|
hash
|
|
625
582
|
end
|
|
626
583
|
|
|
627
|
-
# Outputs non-array value in the form of hash
|
|
628
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
629
|
-
# @param [Object] value Any valid value
|
|
630
|
-
# @return [Hash] Returns the value in the form of hash
|
|
631
|
-
def _to_hash(value)
|
|
632
|
-
if value.is_a?(Array)
|
|
633
|
-
value.compact.map { |v| _to_hash(v) }
|
|
634
|
-
elsif value.is_a?(Hash)
|
|
635
|
-
{}.tap do |hash|
|
|
636
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
637
|
-
end
|
|
638
|
-
elsif value.respond_to? :to_hash
|
|
639
|
-
value.to_hash
|
|
640
|
-
else
|
|
641
|
-
value
|
|
642
|
-
end
|
|
643
|
-
end
|
|
644
|
-
|
|
645
584
|
end
|
|
646
585
|
|
|
647
586
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.25.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
class ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails
|
|
17
|
+
class ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails < ApiModelBase
|
|
18
18
|
# Payment error code
|
|
19
19
|
attr_accessor :return_code
|
|
20
20
|
|
|
@@ -50,6 +50,8 @@ module Tremendous
|
|
|
50
50
|
# List of attributes with nullable: true
|
|
51
51
|
def self.openapi_nullable
|
|
52
52
|
Set.new([
|
|
53
|
+
:'return_code',
|
|
54
|
+
:'description'
|
|
53
55
|
])
|
|
54
56
|
end
|
|
55
57
|
|
|
@@ -137,61 +139,6 @@ module Tremendous
|
|
|
137
139
|
new(transformed_hash)
|
|
138
140
|
end
|
|
139
141
|
|
|
140
|
-
# Deserializes the data based on type
|
|
141
|
-
# @param string type Data type
|
|
142
|
-
# @param string value Value to be deserialized
|
|
143
|
-
# @return [Object] Deserialized data
|
|
144
|
-
def self._deserialize(type, value)
|
|
145
|
-
case type.to_sym
|
|
146
|
-
when :Time
|
|
147
|
-
Time.parse(value)
|
|
148
|
-
when :Date
|
|
149
|
-
Date.parse(value)
|
|
150
|
-
when :String
|
|
151
|
-
value.to_s
|
|
152
|
-
when :Integer
|
|
153
|
-
value.to_i
|
|
154
|
-
when :Float
|
|
155
|
-
value.to_f
|
|
156
|
-
when :Boolean
|
|
157
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
158
|
-
true
|
|
159
|
-
else
|
|
160
|
-
false
|
|
161
|
-
end
|
|
162
|
-
when :Object
|
|
163
|
-
# generic object (usually a Hash), return directly
|
|
164
|
-
value
|
|
165
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
166
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
167
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
168
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
169
|
-
k_type = Regexp.last_match[:k_type]
|
|
170
|
-
v_type = Regexp.last_match[:v_type]
|
|
171
|
-
{}.tap do |hash|
|
|
172
|
-
value.each do |k, v|
|
|
173
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
else # model
|
|
177
|
-
# models (e.g. Pet) or oneOf
|
|
178
|
-
klass = Tremendous.const_get(type)
|
|
179
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
180
|
-
end
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Returns the string representation of the object
|
|
184
|
-
# @return [String] String presentation of the object
|
|
185
|
-
def to_s
|
|
186
|
-
to_hash.to_s
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
190
|
-
# @return [Hash] Returns the object in the form of hash
|
|
191
|
-
def to_body
|
|
192
|
-
to_hash
|
|
193
|
-
end
|
|
194
|
-
|
|
195
142
|
# Returns the object in the form of hash
|
|
196
143
|
# @return [Hash] Returns the object in the form of hash
|
|
197
144
|
def to_hash
|
|
@@ -208,24 +155,6 @@ module Tremendous
|
|
|
208
155
|
hash
|
|
209
156
|
end
|
|
210
157
|
|
|
211
|
-
# Outputs non-array value in the form of hash
|
|
212
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
213
|
-
# @param [Object] value Any valid value
|
|
214
|
-
# @return [Hash] Returns the value in the form of hash
|
|
215
|
-
def _to_hash(value)
|
|
216
|
-
if value.is_a?(Array)
|
|
217
|
-
value.compact.map { |v| _to_hash(v) }
|
|
218
|
-
elsif value.is_a?(Hash)
|
|
219
|
-
{}.tap do |hash|
|
|
220
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
221
|
-
end
|
|
222
|
-
elsif value.respond_to? :to_hash
|
|
223
|
-
value.to_hash
|
|
224
|
-
else
|
|
225
|
-
value
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
|
|
229
158
|
end
|
|
230
159
|
|
|
231
160
|
end
|