tremendous_ruby 5.9.0 → 5.11.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 +530 -58
- data/lib/tremendous/api_client.rb +1 -1
- data/lib/tremendous/api_error.rb +1 -1
- data/lib/tremendous/configuration.rb +1 -1
- data/lib/tremendous/models/allow_email.rb +20 -4
- data/lib/tremendous/models/allow_email1.rb +20 -4
- data/lib/tremendous/models/allow_ip.rb +20 -4
- data/lib/tremendous/models/allow_ip1.rb +20 -4
- data/lib/tremendous/models/balance_transaction.rb +60 -4
- data/lib/tremendous/models/balance_transaction_order.rb +10 -4
- data/lib/tremendous/models/balance_transaction_order_payment.rb +10 -4
- data/lib/tremendous/models/base_order_for_create.rb +20 -4
- data/lib/tremendous/models/campaign.rb +30 -4
- data/lib/tremendous/models/campaign_base.rb +10 -4
- data/lib/tremendous/models/channel.rb +3 -2
- data/lib/tremendous/models/connected_organization.rb +313 -0
- data/lib/tremendous/models/connected_organization_member.rb +346 -0
- data/lib/tremendous/models/connected_organization_member_member.rb +382 -0
- data/lib/tremendous/models/connected_organization_member_session.rb +357 -0
- data/lib/tremendous/models/connected_organization_organization.rb +350 -0
- data/lib/tremendous/models/create_api_key200_response.rb +10 -4
- data/lib/tremendous/models/create_campaign200_response.rb +237 -0
- data/lib/tremendous/models/create_campaign_request.rb +30 -4
- data/lib/tremendous/models/create_connected_organization200_response.rb +237 -0
- data/lib/tremendous/models/create_connected_organization_member200_response.rb +237 -0
- data/lib/tremendous/models/create_connected_organization_member_request.rb +238 -0
- data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +237 -0
- data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +357 -0
- data/lib/tremendous/models/create_connected_organization_member_session_request.rb +238 -0
- data/lib/tremendous/models/create_connected_organization_request.rb +238 -0
- data/lib/tremendous/models/create_invoice200_response.rb +20 -4
- data/lib/tremendous/models/create_invoice_request.rb +20 -4
- data/lib/tremendous/models/create_member.rb +30 -4
- data/lib/tremendous/models/create_member200_response.rb +20 -4
- data/lib/tremendous/models/create_member_request.rb +30 -4
- data/lib/tremendous/models/create_order200_response.rb +20 -4
- data/lib/tremendous/models/create_order200_response_order.rb +22 -6
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +10 -4
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +11 -5
- data/lib/tremendous/models/create_order_request.rb +1 -1
- data/lib/tremendous/models/create_organization.rb +40 -4
- data/lib/tremendous/models/create_organization200_response.rb +10 -4
- data/lib/tremendous/models/create_organization200_response_organization.rb +30 -4
- data/lib/tremendous/models/create_organization_for_response.rb +30 -4
- data/lib/tremendous/models/create_organization_properties.rb +10 -4
- data/lib/tremendous/models/create_organization_request.rb +40 -4
- data/lib/tremendous/models/create_organization_request_copy_settings.rb +26 -8
- data/lib/tremendous/models/create_report200_response.rb +247 -0
- data/lib/tremendous/models/create_report200_response_report.rb +297 -0
- data/lib/tremendous/models/create_report_request.rb +10 -4
- data/lib/tremendous/models/create_report_request_filters.rb +10 -4
- data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +10 -4
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +10 -4
- data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +10 -4
- data/lib/tremendous/models/create_webhook200_response.rb +10 -4
- data/lib/tremendous/models/create_webhook_request.rb +20 -4
- data/lib/tremendous/models/currency_codes.rb +1 -1
- data/lib/tremendous/models/custom_field.rb +10 -4
- data/lib/tremendous/models/delete_fraud_rule200_response.rb +20 -4
- data/lib/tremendous/models/delivery_details.rb +11 -5
- data/lib/tremendous/models/delivery_details_with_link.rb +11 -5
- data/lib/tremendous/models/delivery_metadata.rb +10 -4
- 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 +20 -4
- data/lib/tremendous/models/field.rb +10 -4
- data/lib/tremendous/models/fraud_config_allow_email.rb +20 -4
- data/lib/tremendous/models/fraud_config_country.rb +20 -4
- data/lib/tremendous/models/fraud_config_country_update_list.rb +20 -4
- data/lib/tremendous/models/fraud_config_ip.rb +20 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +10 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +10 -4
- data/lib/tremendous/models/fraud_config_review_email.rb +10 -4
- data/lib/tremendous/models/fraud_generic_response.rb +20 -4
- data/lib/tremendous/models/fraud_review.rb +10 -4
- data/lib/tremendous/models/fraud_review_geo.rb +10 -4
- data/lib/tremendous/models/fraud_review_list_item.rb +10 -4
- data/lib/tremendous/models/fraud_review_reason.rb +1 -1
- data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
- data/lib/tremendous/models/fraud_review_related_rewards.rb +10 -4
- 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 +20 -4
- data/lib/tremendous/models/fraud_rule400_response.rb +20 -4
- data/lib/tremendous/models/fraud_rule422_response.rb +20 -4
- data/lib/tremendous/models/fraud_rule_request.rb +10 -4
- data/lib/tremendous/models/fraud_rule_request_config.rb +1 -1
- data/lib/tremendous/models/fraud_rule_type.rb +1 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +10 -4
- data/lib/tremendous/models/funding_source.rb +55 -5
- data/lib/tremendous/models/generate_reward_link200_response.rb +20 -4
- data/lib/tremendous/models/generate_reward_link200_response_reward.rb +10 -4
- data/lib/tremendous/models/generate_reward_link403_response.rb +20 -4
- data/lib/tremendous/models/get_fraud_review200_response.rb +20 -4
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +10 -4
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +10 -4
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +10 -4
- data/lib/tremendous/models/get_funding_source200_response.rb +20 -4
- data/lib/tremendous/models/get_member200_response.rb +20 -4
- data/lib/tremendous/models/get_member200_response_member.rb +20 -4
- data/lib/tremendous/models/get_member200_response_member_events_inner.rb +10 -4
- data/lib/tremendous/models/get_order200_response.rb +20 -4
- data/lib/tremendous/models/get_organization200_response.rb +10 -4
- data/lib/tremendous/models/get_product_response.rb +20 -4
- data/lib/tremendous/models/get_reward200_response.rb +20 -4
- data/lib/tremendous/models/inline_object.rb +231 -0
- data/lib/tremendous/models/inline_object1.rb +237 -0
- data/lib/tremendous/models/inline_object1_reward.rb +263 -0
- data/lib/tremendous/models/invoice.rb +40 -4
- data/lib/tremendous/models/list_balance_transactions200_response.rb +20 -4
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +60 -4
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +10 -4
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +10 -4
- data/lib/tremendous/models/list_campaigns200_response.rb +20 -4
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +30 -4
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +10 -4
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +10 -4
- data/lib/tremendous/models/list_connected_organization_members200_response.rb +266 -0
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +346 -0
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +382 -0
- data/lib/tremendous/models/list_connected_organizations200_response.rb +266 -0
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +313 -0
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +350 -0
- data/lib/tremendous/models/list_fields200_response.rb +10 -4
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +10 -4
- data/lib/tremendous/models/list_forex_response.rb +20 -4
- data/lib/tremendous/models/list_fraud_reviews200_response.rb +30 -4
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +10 -4
- data/lib/tremendous/models/list_fraud_rules200_response.rb +20 -4
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +10 -4
- data/lib/tremendous/models/list_funding_sources200_response.rb +20 -4
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +55 -5
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +144 -6
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +10 -4
- data/lib/tremendous/models/list_invoices200_response.rb +30 -4
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +40 -4
- data/lib/tremendous/models/list_members200_response.rb +20 -4
- data/lib/tremendous/models/list_members200_response_members_inner.rb +20 -4
- data/lib/tremendous/models/list_orders200_response.rb +30 -4
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +22 -6
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +10 -4
- data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +10 -4
- data/lib/tremendous/models/list_organizations200_response.rb +10 -4
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +30 -4
- data/lib/tremendous/models/list_products_response.rb +20 -4
- data/lib/tremendous/models/list_products_response_products_inner.rb +67 -11
- data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +20 -4
- data/lib/tremendous/models/list_products_response_products_inner_documents.rb +242 -0
- data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +35 -8
- data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +10 -4
- data/lib/tremendous/models/list_rewards200_response.rb +10 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +10 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +10 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +11 -5
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +10 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +20 -4
- data/lib/tremendous/models/list_rewards401_response.rb +20 -4
- data/lib/tremendous/models/list_rewards401_response_errors.rb +10 -4
- data/lib/tremendous/models/list_rewards429_response.rb +20 -4
- data/lib/tremendous/models/list_roles200_response.rb +20 -4
- data/lib/tremendous/models/list_roles200_response_roles_inner.rb +30 -4
- data/lib/tremendous/models/list_webhook_events200_response.rb +10 -4
- data/lib/tremendous/models/list_webhooks200_response.rb +10 -4
- data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +10 -4
- data/lib/tremendous/models/member.rb +20 -4
- data/lib/tremendous/models/member_base.rb +20 -4
- data/lib/tremendous/models/member_with_events.rb +20 -4
- data/lib/tremendous/models/member_without_events.rb +20 -4
- data/lib/tremendous/models/order.rb +22 -6
- data/lib/tremendous/models/order_base.rb +22 -6
- data/lib/tremendous/models/order_base_payment.rb +10 -4
- data/lib/tremendous/models/order_status.rb +1 -1
- data/lib/tremendous/models/order_with_link.rb +22 -6
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +10 -4
- data/lib/tremendous/models/order_without_link.rb +22 -6
- data/lib/tremendous/models/order_without_link_rewards_inner.rb +10 -4
- data/lib/tremendous/models/organization.rb +30 -4
- data/lib/tremendous/models/payment_details.rb +10 -4
- data/lib/tremendous/models/payment_details_refund.rb +10 -4
- data/lib/tremendous/models/payout.rb +10 -4
- data/lib/tremendous/models/product.rb +67 -11
- data/lib/tremendous/models/product_documents.rb +242 -0
- data/lib/tremendous/models/recipient.rb +10 -4
- data/lib/tremendous/models/refund_details.rb +10 -4
- data/lib/tremendous/models/report.rb +10 -4
- data/lib/tremendous/models/resend_reward422_response.rb +20 -4
- data/lib/tremendous/models/resend_reward_request.rb +10 -4
- data/lib/tremendous/models/review_country.rb +20 -4
- data/lib/tremendous/models/review_country1.rb +20 -4
- data/lib/tremendous/models/review_email.rb +10 -4
- data/lib/tremendous/models/review_email1.rb +10 -4
- data/lib/tremendous/models/review_ip.rb +20 -4
- data/lib/tremendous/models/review_ip1.rb +20 -4
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +10 -4
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +10 -4
- data/lib/tremendous/models/reward.rb +10 -4
- data/lib/tremendous/models/reward_base.rb +10 -4
- data/lib/tremendous/models/reward_base_custom_fields_inner.rb +10 -4
- data/lib/tremendous/models/reward_for_order_create.rb +10 -4
- data/lib/tremendous/models/reward_link.rb +10 -4
- data/lib/tremendous/models/reward_token.rb +10 -4
- data/lib/tremendous/models/reward_value.rb +20 -4
- data/lib/tremendous/models/reward_with_link.rb +10 -4
- data/lib/tremendous/models/reward_with_link_delivery.rb +11 -5
- data/lib/tremendous/models/reward_without_link.rb +10 -4
- data/lib/tremendous/models/reward_without_link_delivery.rb +11 -5
- data/lib/tremendous/models/role.rb +30 -4
- data/lib/tremendous/models/simulate_webhook_request.rb +20 -4
- data/lib/tremendous/models/single_reward_order.rb +20 -4
- data/lib/tremendous/models/single_reward_order_payment.rb +20 -4
- data/lib/tremendous/models/single_reward_order_reward.rb +10 -4
- data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +10 -4
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +10 -4
- data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +10 -4
- data/lib/tremendous/models/single_reward_order_with_link.rb +20 -4
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +22 -6
- data/lib/tremendous/models/single_reward_order_without_link.rb +20 -4
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +22 -6
- data/lib/tremendous/models/update_campaign.rb +10 -4
- data/lib/tremendous/models/update_campaign_request.rb +10 -4
- data/lib/tremendous/models/update_fraud_rule_list200_response.rb +20 -4
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +20 -4
- data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +1 -1
- data/lib/tremendous/models/webhook.rb +10 -4
- data/lib/tremendous/models/webhook_post.rb +20 -4
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +27 -6
- metadata +29 -7
@@ -0,0 +1,238 @@
|
|
1
|
+
=begin
|
2
|
+
#API Endpoints
|
3
|
+
|
4
|
+
#Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2
|
7
|
+
Contact: developers@tremendous.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Tremendous
|
17
|
+
class CreateConnectedOrganizationRequest
|
18
|
+
# The client ID of the OAuth application.
|
19
|
+
attr_accessor :client_id
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'client_id' => :'client_id'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns attribute mapping this model knows about
|
29
|
+
def self.acceptable_attribute_map
|
30
|
+
attribute_map
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
acceptable_attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'client_id' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateConnectedOrganizationRequest` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateConnectedOrganizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'client_id')
|
68
|
+
self.client_id = attributes[:'client_id']
|
69
|
+
else
|
70
|
+
self.client_id = nil
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
|
+
invalid_properties = Array.new
|
79
|
+
if @client_id.nil?
|
80
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
81
|
+
end
|
82
|
+
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
90
|
+
return false if @client_id.nil?
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Custom attribute writer method with validation
|
95
|
+
# @param [Object] client_id Value to be assigned
|
96
|
+
def client_id=(client_id)
|
97
|
+
if client_id.nil?
|
98
|
+
fail ArgumentError, 'client_id cannot be nil'
|
99
|
+
end
|
100
|
+
|
101
|
+
@client_id = client_id
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
client_id == o.client_id
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Integer] Hash code
|
120
|
+
def hash
|
121
|
+
[client_id].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def self.build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
|
+
end
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
|
+
end
|
143
|
+
end
|
144
|
+
new(transformed_hash)
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def self._deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :Time
|
154
|
+
Time.parse(value)
|
155
|
+
when :Date
|
156
|
+
Date.parse(value)
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :Boolean
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else # model
|
184
|
+
# models (e.g. Pet) or oneOf
|
185
|
+
klass = Tremendous.const_get(type)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the string representation of the object
|
191
|
+
# @return [String] String presentation of the object
|
192
|
+
def to_s
|
193
|
+
to_hash.to_s
|
194
|
+
end
|
195
|
+
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_body
|
199
|
+
to_hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the object in the form of hash
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_hash
|
205
|
+
hash = {}
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
207
|
+
value = self.send(attr)
|
208
|
+
if value.nil?
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
211
|
+
end
|
212
|
+
|
213
|
+
hash[param] = _to_hash(value)
|
214
|
+
end
|
215
|
+
hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Outputs non-array value in the form of hash
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
220
|
+
# @param [Object] value Any valid value
|
221
|
+
# @return [Hash] Returns the value in the form of hash
|
222
|
+
def _to_hash(value)
|
223
|
+
if value.is_a?(Array)
|
224
|
+
value.compact.map { |v| _to_hash(v) }
|
225
|
+
elsif value.is_a?(Hash)
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
228
|
+
end
|
229
|
+
elsif value.respond_to? :to_hash
|
230
|
+
value.to_hash
|
231
|
+
else
|
232
|
+
value
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
|
238
|
+
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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,9 +24,14 @@ module Tremendous
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
27
32
|
# Returns all the JSON keys this model knows about
|
28
33
|
def self.acceptable_attributes
|
29
|
-
|
34
|
+
acceptable_attribute_map.values
|
30
35
|
end
|
31
36
|
|
32
37
|
# Attribute type mapping.
|
@@ -50,9 +55,10 @@ module Tremendous
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateInvoice200Response`. Please check the name to make sure it's valid. List of attributes: " +
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateInvoice200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
56
62
|
end
|
57
63
|
h[k.to_sym] = v
|
58
64
|
}
|
@@ -84,6 +90,16 @@ module Tremendous
|
|
84
90
|
true
|
85
91
|
end
|
86
92
|
|
93
|
+
# Custom attribute writer method with validation
|
94
|
+
# @param [Object] invoice Value to be assigned
|
95
|
+
def invoice=(invoice)
|
96
|
+
if invoice.nil?
|
97
|
+
fail ArgumentError, 'invoice cannot be nil'
|
98
|
+
end
|
99
|
+
|
100
|
+
@invoice = invoice
|
101
|
+
end
|
102
|
+
|
87
103
|
# Checks equality by comparing each attribute.
|
88
104
|
# @param [Object] Object to be compared
|
89
105
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,9 +33,14 @@ module Tremendous
|
|
33
33
|
}
|
34
34
|
end
|
35
35
|
|
36
|
+
# Returns attribute mapping this model knows about
|
37
|
+
def self.acceptable_attribute_map
|
38
|
+
attribute_map
|
39
|
+
end
|
40
|
+
|
36
41
|
# Returns all the JSON keys this model knows about
|
37
42
|
def self.acceptable_attributes
|
38
|
-
|
43
|
+
acceptable_attribute_map.values
|
39
44
|
end
|
40
45
|
|
41
46
|
# Attribute type mapping.
|
@@ -63,9 +68,10 @@ module Tremendous
|
|
63
68
|
end
|
64
69
|
|
65
70
|
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
66
72
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
-
if (!
|
68
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateInvoiceRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateInvoiceRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
69
75
|
end
|
70
76
|
h[k.to_sym] = v
|
71
77
|
}
|
@@ -105,6 +111,16 @@ module Tremendous
|
|
105
111
|
true
|
106
112
|
end
|
107
113
|
|
114
|
+
# Custom attribute writer method with validation
|
115
|
+
# @param [Object] amount Value to be assigned
|
116
|
+
def amount=(amount)
|
117
|
+
if amount.nil?
|
118
|
+
fail ArgumentError, 'amount cannot be nil'
|
119
|
+
end
|
120
|
+
|
121
|
+
@amount = amount
|
122
|
+
end
|
123
|
+
|
108
124
|
# Checks equality by comparing each attribute.
|
109
125
|
# @param [Object] Object to be compared
|
110
126
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -29,9 +29,14 @@ module Tremendous
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
|
+
# Returns attribute mapping this model knows about
|
33
|
+
def self.acceptable_attribute_map
|
34
|
+
attribute_map
|
35
|
+
end
|
36
|
+
|
32
37
|
# Returns all the JSON keys this model knows about
|
33
38
|
def self.acceptable_attributes
|
34
|
-
|
39
|
+
acceptable_attribute_map.values
|
35
40
|
end
|
36
41
|
|
37
42
|
# Attribute type mapping.
|
@@ -56,9 +61,10 @@ module Tremendous
|
|
56
61
|
end
|
57
62
|
|
58
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
-
if (!
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMember`. Please check the name to make sure it's valid. List of attributes: " +
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMember`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
62
68
|
end
|
63
69
|
h[k.to_sym] = v
|
64
70
|
}
|
@@ -101,6 +107,26 @@ module Tremendous
|
|
101
107
|
true
|
102
108
|
end
|
103
109
|
|
110
|
+
# Custom attribute writer method with validation
|
111
|
+
# @param [Object] email Value to be assigned
|
112
|
+
def email=(email)
|
113
|
+
if email.nil?
|
114
|
+
fail ArgumentError, 'email cannot be nil'
|
115
|
+
end
|
116
|
+
|
117
|
+
@email = email
|
118
|
+
end
|
119
|
+
|
120
|
+
# Custom attribute writer method with validation
|
121
|
+
# @param [Object] role Value to be assigned
|
122
|
+
def role=(role)
|
123
|
+
if role.nil?
|
124
|
+
fail ArgumentError, 'role cannot be nil'
|
125
|
+
end
|
126
|
+
|
127
|
+
@role = role
|
128
|
+
end
|
129
|
+
|
104
130
|
# Checks equality by comparing each attribute.
|
105
131
|
# @param [Object] Object to be compared
|
106
132
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,9 +24,14 @@ module Tremendous
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
27
32
|
# Returns all the JSON keys this model knows about
|
28
33
|
def self.acceptable_attributes
|
29
|
-
|
34
|
+
acceptable_attribute_map.values
|
30
35
|
end
|
31
36
|
|
32
37
|
# Attribute type mapping.
|
@@ -50,9 +55,10 @@ module Tremendous
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMember200Response`. Please check the name to make sure it's valid. List of attributes: " +
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMember200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
56
62
|
end
|
57
63
|
h[k.to_sym] = v
|
58
64
|
}
|
@@ -84,6 +90,16 @@ module Tremendous
|
|
84
90
|
true
|
85
91
|
end
|
86
92
|
|
93
|
+
# Custom attribute writer method with validation
|
94
|
+
# @param [Object] member Value to be assigned
|
95
|
+
def member=(member)
|
96
|
+
if member.nil?
|
97
|
+
fail ArgumentError, 'member cannot be nil'
|
98
|
+
end
|
99
|
+
|
100
|
+
@member = member
|
101
|
+
end
|
102
|
+
|
87
103
|
# Checks equality by comparing each attribute.
|
88
104
|
# @param [Object] Object to be compared
|
89
105
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -29,9 +29,14 @@ module Tremendous
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
|
+
# Returns attribute mapping this model knows about
|
33
|
+
def self.acceptable_attribute_map
|
34
|
+
attribute_map
|
35
|
+
end
|
36
|
+
|
32
37
|
# Returns all the JSON keys this model knows about
|
33
38
|
def self.acceptable_attributes
|
34
|
-
|
39
|
+
acceptable_attribute_map.values
|
35
40
|
end
|
36
41
|
|
37
42
|
# Attribute type mapping.
|
@@ -56,9 +61,10 @@ module Tremendous
|
|
56
61
|
end
|
57
62
|
|
58
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
59
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
-
if (!
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMemberRequest`. Please check the name to make sure it's valid. List of attributes: " +
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateMemberRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
62
68
|
end
|
63
69
|
h[k.to_sym] = v
|
64
70
|
}
|
@@ -101,6 +107,26 @@ module Tremendous
|
|
101
107
|
true
|
102
108
|
end
|
103
109
|
|
110
|
+
# Custom attribute writer method with validation
|
111
|
+
# @param [Object] email Value to be assigned
|
112
|
+
def email=(email)
|
113
|
+
if email.nil?
|
114
|
+
fail ArgumentError, 'email cannot be nil'
|
115
|
+
end
|
116
|
+
|
117
|
+
@email = email
|
118
|
+
end
|
119
|
+
|
120
|
+
# Custom attribute writer method with validation
|
121
|
+
# @param [Object] role Value to be assigned
|
122
|
+
def role=(role)
|
123
|
+
if role.nil?
|
124
|
+
fail ArgumentError, 'role cannot be nil'
|
125
|
+
end
|
126
|
+
|
127
|
+
@role = role
|
128
|
+
end
|
129
|
+
|
104
130
|
# Checks equality by comparing each attribute.
|
105
131
|
# @param [Object] Object to be compared
|
106
132
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,9 +24,14 @@ module Tremendous
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
27
32
|
# Returns all the JSON keys this model knows about
|
28
33
|
def self.acceptable_attributes
|
29
|
-
|
34
|
+
acceptable_attribute_map.values
|
30
35
|
end
|
31
36
|
|
32
37
|
# Attribute type mapping.
|
@@ -50,9 +55,10 @@ module Tremendous
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200Response`. Please check the name to make sure it's valid. List of attributes: " +
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
56
62
|
end
|
57
63
|
h[k.to_sym] = v
|
58
64
|
}
|
@@ -84,6 +90,16 @@ module Tremendous
|
|
84
90
|
true
|
85
91
|
end
|
86
92
|
|
93
|
+
# Custom attribute writer method with validation
|
94
|
+
# @param [Object] order Value to be assigned
|
95
|
+
def order=(order)
|
96
|
+
if order.nil?
|
97
|
+
fail ArgumentError, 'order cannot be nil'
|
98
|
+
end
|
99
|
+
|
100
|
+
@order = order
|
101
|
+
end
|
102
|
+
|
87
103
|
# Checks equality by comparing each attribute.
|
88
104
|
# @param [Object] Object to be compared
|
89
105
|
def ==(o)
|
@@ -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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -78,9 +78,14 @@ module Tremendous
|
|
78
78
|
}
|
79
79
|
end
|
80
80
|
|
81
|
+
# Returns attribute mapping this model knows about
|
82
|
+
def self.acceptable_attribute_map
|
83
|
+
attribute_map
|
84
|
+
end
|
85
|
+
|
81
86
|
# Returns all the JSON keys this model knows about
|
82
87
|
def self.acceptable_attributes
|
83
|
-
|
88
|
+
acceptable_attribute_map.values
|
84
89
|
end
|
85
90
|
|
86
91
|
# Attribute type mapping.
|
@@ -114,9 +119,10 @@ module Tremendous
|
|
114
119
|
end
|
115
120
|
|
116
121
|
# check to see if the attribute exists and convert string to symbol for hash key
|
122
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
117
123
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
118
|
-
if (!
|
119
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200ResponseOrder`. Please check the name to make sure it's valid. List of attributes: " +
|
124
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
125
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200ResponseOrder`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
120
126
|
end
|
121
127
|
h[k.to_sym] = v
|
122
128
|
}
|
@@ -207,7 +213,7 @@ module Tremendous
|
|
207
213
|
return false if @status.nil?
|
208
214
|
status_validator = EnumAttributeValidator.new('String', ["CANCELED", "CART", "EXECUTED", "FAILED", "PENDING APPROVAL", "PENDING INTERNAL PAYMENT APPROVAL"])
|
209
215
|
return false unless status_validator.valid?(@status)
|
210
|
-
channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
216
|
+
channel_validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
|
211
217
|
return false unless channel_validator.valid?(@channel)
|
212
218
|
true
|
213
219
|
end
|
@@ -238,6 +244,16 @@ module Tremendous
|
|
238
244
|
@campaign_id = campaign_id
|
239
245
|
end
|
240
246
|
|
247
|
+
# Custom attribute writer method with validation
|
248
|
+
# @param [Object] created_at Value to be assigned
|
249
|
+
def created_at=(created_at)
|
250
|
+
if created_at.nil?
|
251
|
+
fail ArgumentError, 'created_at cannot be nil'
|
252
|
+
end
|
253
|
+
|
254
|
+
@created_at = created_at
|
255
|
+
end
|
256
|
+
|
241
257
|
# Custom attribute writer method checking allowed values (enum).
|
242
258
|
# @param [Object] status Object to be assigned
|
243
259
|
def status=(status)
|
@@ -251,7 +267,7 @@ module Tremendous
|
|
251
267
|
# Custom attribute writer method checking allowed values (enum).
|
252
268
|
# @param [Object] channel Object to be assigned
|
253
269
|
def channel=(channel)
|
254
|
-
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY"])
|
270
|
+
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
|
255
271
|
unless validator.valid?(channel)
|
256
272
|
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
257
273
|
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.12.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -50,9 +50,14 @@ module Tremendous
|
|
50
50
|
}
|
51
51
|
end
|
52
52
|
|
53
|
+
# Returns attribute mapping this model knows about
|
54
|
+
def self.acceptable_attribute_map
|
55
|
+
attribute_map
|
56
|
+
end
|
57
|
+
|
53
58
|
# Returns all the JSON keys this model knows about
|
54
59
|
def self.acceptable_attributes
|
55
|
-
|
60
|
+
acceptable_attribute_map.values
|
56
61
|
end
|
57
62
|
|
58
63
|
# Attribute type mapping.
|
@@ -83,9 +88,10 @@ module Tremendous
|
|
83
88
|
end
|
84
89
|
|
85
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
86
92
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
87
|
-
if (!
|
88
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200ResponseOrderRewardsInner`. Please check the name to make sure it's valid. List of attributes: " +
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateOrder200ResponseOrderRewardsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
89
95
|
end
|
90
96
|
h[k.to_sym] = v
|
91
97
|
}
|