Class: UltracartClient::RotatingTransactionGateway
- Inherits:
-
Object
- Object
- UltracartClient::RotatingTransactionGateway
- Defined in:
- lib/ultracart_api/models/rotating_transaction_gateway.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#additional_native_currency_codes ⇒ Object
An array of all currencies known to the UltraCart system and a boolean indicating whether this gateway supports that currency.
-
#auto_order_cancel_unless_response_name ⇒ Object
Advanced feature for canceling an auto order unless the transaction gateway response contains a field with this name.
-
#auto_order_cancel_unless_response_values ⇒ Object
Advanced feature for canceling an auto order unless the transaction gateway response contains a field with the name specified in auto_order_cancel_unless_response_name.
-
#base_currency_code ⇒ Object
The base currency code for your gateway.
-
#cascade_code ⇒ Object
Optional field specifying a different rotating gateway to use if this gateway fails to process the transaction.
-
#cascade_codes ⇒ Object
A list of other rotating transaction gateways that can be used as a lookup to assign actions based on failures of this gateway.
-
#cascade_daily_auto_order_code ⇒ Object
The code for the next rotating gateway that should be used when this gateway reaches a daily limit.
-
#charge_appears_on_statement_as ⇒ Object
Optional field providing an alternate Charge Appears As value for this rotating gateway.
-
#code ⇒ Object
A human friendly short code used to recognize and differentiate this rotating gateway with other rotating gateways.
-
#current_daily ⇒ Object
The current daily dollar amount this gateway has processed.
-
#current_daily_auto_order ⇒ Object
The current daily dollar amount of auto orders (recurring) this gateway has processed.
-
#current_monthly ⇒ Object
The current monthly dollar amount this gateway has processed.
-
#customer_service_email ⇒ Object
The customer service email address for this gateway.
-
#customer_service_phone ⇒ Object
The customer service phone number for this gateway.
-
#day_of_month_restrictions ⇒ Object
Array containing all 31 (possible) days and any optional restrictions for one or more days.
-
#day_of_week_restrictions ⇒ Object
Array containing all seven days of the week and any optional restrictions for one or more days.
-
#deactivate_after_failures ⇒ Object
If non-zero, this gateway will be deactivated after reaching this amount of consecutive failures.
-
#end_date ⇒ Object
Optional field to specify an absolute date when this gateway should stop accepting transactions.
-
#gateways ⇒ Object
An array of all transaction gateways, not just the one currently configured for this rotating gateway.
-
#maximum_daily ⇒ Object
The maximum daily dollar amount this gateway may process.
-
#maximum_daily_auto_order ⇒ Object
The maximum daily dollar amount of auto orders (recurring) this gateway may process.
-
#maximum_monthly ⇒ Object
The maximum monthly dollar amount this gateway may process.
-
#next_daily_auto_order_reset ⇒ Object
The date and time when this gateway daily limit for auto orders will reset.
-
#next_daily_reset ⇒ Object
The date and time when this gateway daily limit will reset.
-
#next_monthly_reset ⇒ Object
The date and time when this gateway monthly limit will reset.
-
#order_total ⇒ Object
This optional field is combined with order_total_comparison to determine if an order should be processed thorugh this gateway.
-
#order_total_comparison ⇒ Object
The math operator used to determine if the order total is allowed to process through this gateway.
-
#rebill_auto_orders_against_this_rtg_code ⇒ Object
If specified auto orders (rebills) are routed to this rotating gateway.
-
#reserve_days ⇒ Object
The number of days that your gateway holds any reserves.
-
#reserve_percentage ⇒ Object
The percentage of an order which your gateway is holding in reserve.
-
#reserve_refunded ⇒ Object
If true, reserves are refunded when an order is refunded.
-
#reserves_released_through ⇒ Object
An optional date specifying the date up to which your gateway has released all reserve funds.
-
#rotating_transaction_gateway_oid ⇒ Object
Internal identifier used to store and retrieve this gateway information.
-
#selected_gateway_name ⇒ Object
The name of the currently selected transaction gateway used by this rotating gateway.
-
#show_cascade_codes ⇒ Object
A boolean used by the builtin UltraCart UI to determine if cascading rtg codes should be shown.
-
#show_merchant_account_profiles ⇒ Object
A flag to help the UltraCart UI to know whether to show merchant account profiles or not.
-
#start_date ⇒ Object
Optional field to specify an absolute date when this gateway should begin accepting transactions.
-
#status ⇒ Object
A field used to take a gateway offline without removing/deleting the configuration.
-
#theme_restrictions ⇒ Object
Optional restrictions by theme/storefront.
-
#traffic_percentage ⇒ Object
Required field between 0 and 1 that dictates the percentage of traffic that should flow through this gateway.
-
#trial_daily_amount ⇒ Object
If specified, limits the total daily count of trial orders.
-
#trial_daily_limit ⇒ Object
If specified, limits the total daily dollar amount of trial orders.
-
#trial_monthly_amount ⇒ Object
If specified, limits the total month dollar amount of trial orders.
-
#trial_monthly_limit ⇒ Object
If specified, limits the total month count of trial orders.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RotatingTransactionGateway
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ RotatingTransactionGateway
Initializes the object
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 273 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'additional_native_currency_codes') if (value = attributes[:'additional_native_currency_codes']).is_a?(Array) self.additional_native_currency_codes = value end end if attributes.has_key?(:'auto_order_cancel_unless_response_name') self.auto_order_cancel_unless_response_name = attributes[:'auto_order_cancel_unless_response_name'] end if attributes.has_key?(:'auto_order_cancel_unless_response_values') if (value = attributes[:'auto_order_cancel_unless_response_values']).is_a?(Array) self.auto_order_cancel_unless_response_values = value end end if attributes.has_key?(:'base_currency_code') self.base_currency_code = attributes[:'base_currency_code'] end if attributes.has_key?(:'cascade_code') self.cascade_code = attributes[:'cascade_code'] end if attributes.has_key?(:'cascade_codes') if (value = attributes[:'cascade_codes']).is_a?(Array) self.cascade_codes = value end end if attributes.has_key?(:'cascade_daily_auto_order_code') self.cascade_daily_auto_order_code = attributes[:'cascade_daily_auto_order_code'] end if attributes.has_key?(:'charge_appears_on_statement_as') self.charge_appears_on_statement_as = attributes[:'charge_appears_on_statement_as'] end if attributes.has_key?(:'code') self.code = attributes[:'code'] end if attributes.has_key?(:'current_daily') self.current_daily = attributes[:'current_daily'] end if attributes.has_key?(:'current_daily_auto_order') self.current_daily_auto_order = attributes[:'current_daily_auto_order'] end if attributes.has_key?(:'current_monthly') self.current_monthly = attributes[:'current_monthly'] end if attributes.has_key?(:'customer_service_email') self.customer_service_email = attributes[:'customer_service_email'] end if attributes.has_key?(:'customer_service_phone') self.customer_service_phone = attributes[:'customer_service_phone'] end if attributes.has_key?(:'day_of_month_restrictions') if (value = attributes[:'day_of_month_restrictions']).is_a?(Array) self.day_of_month_restrictions = value end end if attributes.has_key?(:'day_of_week_restrictions') if (value = attributes[:'day_of_week_restrictions']).is_a?(Array) self.day_of_week_restrictions = value end end if attributes.has_key?(:'deactivate_after_failures') self.deactivate_after_failures = attributes[:'deactivate_after_failures'] end if attributes.has_key?(:'end_date') self.end_date = attributes[:'end_date'] end if attributes.has_key?(:'gateways') if (value = attributes[:'gateways']).is_a?(Array) self.gateways = value end end if attributes.has_key?(:'maximum_daily') self.maximum_daily = attributes[:'maximum_daily'] end if attributes.has_key?(:'maximum_daily_auto_order') self.maximum_daily_auto_order = attributes[:'maximum_daily_auto_order'] end if attributes.has_key?(:'maximum_monthly') self.maximum_monthly = attributes[:'maximum_monthly'] end if attributes.has_key?(:'next_daily_auto_order_reset') self.next_daily_auto_order_reset = attributes[:'next_daily_auto_order_reset'] end if attributes.has_key?(:'next_daily_reset') self.next_daily_reset = attributes[:'next_daily_reset'] end if attributes.has_key?(:'next_monthly_reset') self.next_monthly_reset = attributes[:'next_monthly_reset'] end if attributes.has_key?(:'order_total') self.order_total = attributes[:'order_total'] end if attributes.has_key?(:'order_total_comparison') self.order_total_comparison = attributes[:'order_total_comparison'] end if attributes.has_key?(:'rebill_auto_orders_against_this_rtg_code') self.rebill_auto_orders_against_this_rtg_code = attributes[:'rebill_auto_orders_against_this_rtg_code'] end if attributes.has_key?(:'reserve_days') self.reserve_days = attributes[:'reserve_days'] end if attributes.has_key?(:'reserve_percentage') self.reserve_percentage = attributes[:'reserve_percentage'] end if attributes.has_key?(:'reserve_refunded') self.reserve_refunded = attributes[:'reserve_refunded'] end if attributes.has_key?(:'reserves_released_through') self.reserves_released_through = attributes[:'reserves_released_through'] end if attributes.has_key?(:'rotating_transaction_gateway_oid') self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid'] end if attributes.has_key?(:'selected_gateway_name') self.selected_gateway_name = attributes[:'selected_gateway_name'] end if attributes.has_key?(:'show_cascade_codes') self.show_cascade_codes = attributes[:'show_cascade_codes'] end if attributes.has_key?(:'show_merchant_account_profiles') self.show_merchant_account_profiles = attributes[:'show_merchant_account_profiles'] end if attributes.has_key?(:'start_date') self.start_date = attributes[:'start_date'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'theme_restrictions') if (value = attributes[:'theme_restrictions']).is_a?(Array) self.theme_restrictions = value end end if attributes.has_key?(:'traffic_percentage') self.traffic_percentage = attributes[:'traffic_percentage'] end if attributes.has_key?(:'trial_daily_amount') self.trial_daily_amount = attributes[:'trial_daily_amount'] end if attributes.has_key?(:'trial_daily_limit') self.trial_daily_limit = attributes[:'trial_daily_limit'] end if attributes.has_key?(:'trial_monthly_amount') self.trial_monthly_amount = attributes[:'trial_monthly_amount'] end if attributes.has_key?(:'trial_monthly_limit') self.trial_monthly_limit = attributes[:'trial_monthly_limit'] end end |
Instance Attribute Details
#additional_native_currency_codes ⇒ Object
An array of all currencies known to the UltraCart system and a boolean indicating whether this gateway supports that currency.
18 19 20 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 18 def additional_native_currency_codes @additional_native_currency_codes end |
#auto_order_cancel_unless_response_name ⇒ Object
Advanced feature for canceling an auto order unless the transaction gateway response contains a field with this name. If specified, this field must exist and the value must equal a value in the auto_order_cancel_unless_response_values array
21 22 23 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 21 def auto_order_cancel_unless_response_name @auto_order_cancel_unless_response_name end |
#auto_order_cancel_unless_response_values ⇒ Object
Advanced feature for canceling an auto order unless the transaction gateway response contains a field with the name specified in auto_order_cancel_unless_response_name. If specified, this field must exist and the value must equal a value in this array. If nothing matches, the auto order is canceled.
24 25 26 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 24 def auto_order_cancel_unless_response_values @auto_order_cancel_unless_response_values end |
#base_currency_code ⇒ Object
The base currency code for your gateway. For example, USD.
27 28 29 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 27 def base_currency_code @base_currency_code end |
#cascade_code ⇒ Object
Optional field specifying a different rotating gateway to use if this gateway fails to process the transaction.
30 31 32 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 30 def cascade_code @cascade_code end |
#cascade_codes ⇒ Object
A list of other rotating transaction gateways that can be used as a lookup to assign actions based on failures of this gateway
33 34 35 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 33 def cascade_codes @cascade_codes end |
#cascade_daily_auto_order_code ⇒ Object
The code for the next rotating gateway that should be used when this gateway reaches a daily limit
36 37 38 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 36 def cascade_daily_auto_order_code @cascade_daily_auto_order_code end |
#charge_appears_on_statement_as ⇒ Object
Optional field providing an alternate Charge Appears As value for this rotating gateway
39 40 41 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 39 def charge_appears_on_statement_as @charge_appears_on_statement_as end |
#code ⇒ Object
A human friendly short code used to recognize and differentiate this rotating gateway with other rotating gateways
42 43 44 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 42 def code @code end |
#current_daily ⇒ Object
The current daily dollar amount this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
45 46 47 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 45 def current_daily @current_daily end |
#current_daily_auto_order ⇒ Object
The current daily dollar amount of auto orders (recurring) this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
48 49 50 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 48 def current_daily_auto_order @current_daily_auto_order end |
#current_monthly ⇒ Object
The current monthly dollar amount this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
51 52 53 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 51 def current_monthly @current_monthly end |
#customer_service_email ⇒ Object
The customer service email address for this gateway
54 55 56 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 54 def customer_service_email @customer_service_email end |
#customer_service_phone ⇒ Object
The customer service phone number for this gateway
57 58 59 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 57 def customer_service_phone @customer_service_phone end |
#day_of_month_restrictions ⇒ Object
Array containing all 31 (possible) days and any optional restrictions for one or more days.
60 61 62 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 60 def day_of_month_restrictions @day_of_month_restrictions end |
#day_of_week_restrictions ⇒ Object
Array containing all seven days of the week and any optional restrictions for one or more days
63 64 65 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 63 def day_of_week_restrictions @day_of_week_restrictions end |
#deactivate_after_failures ⇒ Object
If non-zero, this gateway will be deactivated after reaching this amount of consecutive failures.
66 67 68 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 66 def deactivate_after_failures @deactivate_after_failures end |
#end_date ⇒ Object
Optional field to specify an absolute date when this gateway should stop accepting transactions
69 70 71 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 69 def end_date @end_date end |
#gateways ⇒ Object
An array of all transaction gateways, not just the one currently configured for this rotating gateway. This allows for easy switching to another gateway. The enabled property on the transaction gateway indicates which one is actually being used.
72 73 74 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 72 def gateways @gateways end |
#maximum_daily ⇒ Object
The maximum daily dollar amount this gateway may process
75 76 77 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 75 def maximum_daily @maximum_daily end |
#maximum_daily_auto_order ⇒ Object
The maximum daily dollar amount of auto orders (recurring) this gateway may process
78 79 80 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 78 def maximum_daily_auto_order @maximum_daily_auto_order end |
#maximum_monthly ⇒ Object
The maximum monthly dollar amount this gateway may process.
81 82 83 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 81 def maximum_monthly @maximum_monthly end |
#next_daily_auto_order_reset ⇒ Object
The date and time when this gateway daily limit for auto orders will reset
84 85 86 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 84 def next_daily_auto_order_reset @next_daily_auto_order_reset end |
#next_daily_reset ⇒ Object
The date and time when this gateway daily limit will reset
87 88 89 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 87 def next_daily_reset @next_daily_reset end |
#next_monthly_reset ⇒ Object
The date and time when this gateway monthly limit will reset
90 91 92 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 90 def next_monthly_reset @next_monthly_reset end |
#order_total ⇒ Object
This optional field is combined with order_total_comparison to determine if an order should be processed thorugh this gateway.
93 94 95 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 93 def order_total @order_total end |
#order_total_comparison ⇒ Object
The math operator used to determine if the order total is allowed to process through this gateway.
96 97 98 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 96 def order_total_comparison @order_total_comparison end |
#rebill_auto_orders_against_this_rtg_code ⇒ Object
If specified auto orders (rebills) are routed to this rotating gateway. This may be needed because rebills lack a credit card cvv.
99 100 101 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 99 def rebill_auto_orders_against_this_rtg_code @rebill_auto_orders_against_this_rtg_code end |
#reserve_days ⇒ Object
The number of days that your gateway holds any reserves. This aids in profitability reporting.
102 103 104 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 102 def reserve_days @reserve_days end |
#reserve_percentage ⇒ Object
The percentage of an order which your gateway is holding in reserve. This aids in profitability reporting.
105 106 107 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 105 def reserve_percentage @reserve_percentage end |
#reserve_refunded ⇒ Object
If true, reserves are refunded when an order is refunded. This aids in profitability reporting.
108 109 110 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 108 def reserve_refunded @reserve_refunded end |
#reserves_released_through ⇒ Object
An optional date specifying the date up to which your gateway has released all reserve funds. This aids in profitability reporting.
111 112 113 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 111 def reserves_released_through @reserves_released_through end |
#rotating_transaction_gateway_oid ⇒ Object
Internal identifier used to store and retrieve this gateway information
114 115 116 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 114 def rotating_transaction_gateway_oid @rotating_transaction_gateway_oid end |
#selected_gateway_name ⇒ Object
The name of the currently selected transaction gateway used by this rotating gateway
117 118 119 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 117 def selected_gateway_name @selected_gateway_name end |
#show_cascade_codes ⇒ Object
A boolean used by the builtin UltraCart UI to determine if cascading rtg codes should be shown
120 121 122 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 120 def show_cascade_codes @show_cascade_codes end |
#show_merchant_account_profiles ⇒ Object
A flag to help the UltraCart UI to know whether to show merchant account profiles or not.
123 124 125 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 123 def show_merchant_account_profiles @show_merchant_account_profiles end |
#start_date ⇒ Object
Optional field to specify an absolute date when this gateway should begin accepting transactions
126 127 128 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 126 def start_date @start_date end |
#status ⇒ Object
A field used to take a gateway offline without removing/deleting the configuration. Inactive marks the gateway as completely unusable. Standby takes the gateway offline and will not be used unless all other active gateways fail.
129 130 131 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 129 def status @status end |
#theme_restrictions ⇒ Object
Optional restrictions by theme/storefront
132 133 134 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 132 def theme_restrictions @theme_restrictions end |
#traffic_percentage ⇒ Object
Required field between 0 and 1 that dictates the percentage of traffic that should flow through this gateway
135 136 137 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 135 def traffic_percentage @traffic_percentage end |
#trial_daily_amount ⇒ Object
If specified, limits the total daily count of trial orders
138 139 140 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 138 def trial_daily_amount @trial_daily_amount end |
#trial_daily_limit ⇒ Object
If specified, limits the total daily dollar amount of trial orders
141 142 143 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 141 def trial_daily_limit @trial_daily_limit end |
#trial_monthly_amount ⇒ Object
If specified, limits the total month dollar amount of trial orders
144 145 146 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 144 def trial_monthly_amount @trial_monthly_amount end |
#trial_monthly_limit ⇒ Object
If specified, limits the total month count of trial orders
147 148 149 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 147 def trial_monthly_limit @trial_monthly_limit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 172 def self.attribute_map { :'additional_native_currency_codes' => :'additional_native_currency_codes', :'auto_order_cancel_unless_response_name' => :'auto_order_cancel_unless_response_name', :'auto_order_cancel_unless_response_values' => :'auto_order_cancel_unless_response_values', :'base_currency_code' => :'base_currency_code', :'cascade_code' => :'cascade_code', :'cascade_codes' => :'cascade_codes', :'cascade_daily_auto_order_code' => :'cascade_daily_auto_order_code', :'charge_appears_on_statement_as' => :'charge_appears_on_statement_as', :'code' => :'code', :'current_daily' => :'current_daily', :'current_daily_auto_order' => :'current_daily_auto_order', :'current_monthly' => :'current_monthly', :'customer_service_email' => :'customer_service_email', :'customer_service_phone' => :'customer_service_phone', :'day_of_month_restrictions' => :'day_of_month_restrictions', :'day_of_week_restrictions' => :'day_of_week_restrictions', :'deactivate_after_failures' => :'deactivate_after_failures', :'end_date' => :'end_date', :'gateways' => :'gateways', :'maximum_daily' => :'maximum_daily', :'maximum_daily_auto_order' => :'maximum_daily_auto_order', :'maximum_monthly' => :'maximum_monthly', :'next_daily_auto_order_reset' => :'next_daily_auto_order_reset', :'next_daily_reset' => :'next_daily_reset', :'next_monthly_reset' => :'next_monthly_reset', :'order_total' => :'order_total', :'order_total_comparison' => :'order_total_comparison', :'rebill_auto_orders_against_this_rtg_code' => :'rebill_auto_orders_against_this_rtg_code', :'reserve_days' => :'reserve_days', :'reserve_percentage' => :'reserve_percentage', :'reserve_refunded' => :'reserve_refunded', :'reserves_released_through' => :'reserves_released_through', :'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid', :'selected_gateway_name' => :'selected_gateway_name', :'show_cascade_codes' => :'show_cascade_codes', :'show_merchant_account_profiles' => :'show_merchant_account_profiles', :'start_date' => :'start_date', :'status' => :'status', :'theme_restrictions' => :'theme_restrictions', :'traffic_percentage' => :'traffic_percentage', :'trial_daily_amount' => :'trial_daily_amount', :'trial_daily_limit' => :'trial_daily_limit', :'trial_monthly_amount' => :'trial_monthly_amount', :'trial_monthly_limit' => :'trial_monthly_limit' } end |
.swagger_types ⇒ Object
Attribute type mapping.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 222 def self.swagger_types { :'additional_native_currency_codes' => :'Array<RtgCurrency>', :'auto_order_cancel_unless_response_name' => :'String', :'auto_order_cancel_unless_response_values' => :'Array<String>', :'base_currency_code' => :'String', :'cascade_code' => :'String', :'cascade_codes' => :'Array<String>', :'cascade_daily_auto_order_code' => :'String', :'charge_appears_on_statement_as' => :'String', :'code' => :'String', :'current_daily' => :'Float', :'current_daily_auto_order' => :'Float', :'current_monthly' => :'Float', :'customer_service_email' => :'String', :'customer_service_phone' => :'String', :'day_of_month_restrictions' => :'Array<RtgDayOfMonthRestriction>', :'day_of_week_restrictions' => :'Array<RtgDayOfWeekRestriction>', :'deactivate_after_failures' => :'Integer', :'end_date' => :'String', :'gateways' => :'Array<TransactionGateway>', :'maximum_daily' => :'Float', :'maximum_daily_auto_order' => :'Float', :'maximum_monthly' => :'Float', :'next_daily_auto_order_reset' => :'String', :'next_daily_reset' => :'String', :'next_monthly_reset' => :'String', :'order_total' => :'Float', :'order_total_comparison' => :'String', :'rebill_auto_orders_against_this_rtg_code' => :'String', :'reserve_days' => :'Integer', :'reserve_percentage' => :'Float', :'reserve_refunded' => :'BOOLEAN', :'reserves_released_through' => :'String', :'rotating_transaction_gateway_oid' => :'Integer', :'selected_gateway_name' => :'String', :'show_cascade_codes' => :'BOOLEAN', :'show_merchant_account_profiles' => :'BOOLEAN', :'start_date' => :'String', :'status' => :'String', :'theme_restrictions' => :'Array<RtgThemeRestriction>', :'traffic_percentage' => :'Float', :'trial_daily_amount' => :'Integer', :'trial_daily_limit' => :'Integer', :'trial_monthly_amount' => :'Integer', :'trial_monthly_limit' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 509 def ==(o) return true if self.equal?(o) self.class == o.class && additional_native_currency_codes == o.additional_native_currency_codes && auto_order_cancel_unless_response_name == o.auto_order_cancel_unless_response_name && auto_order_cancel_unless_response_values == o.auto_order_cancel_unless_response_values && base_currency_code == o.base_currency_code && cascade_code == o.cascade_code && cascade_codes == o.cascade_codes && cascade_daily_auto_order_code == o.cascade_daily_auto_order_code && charge_appears_on_statement_as == o.charge_appears_on_statement_as && code == o.code && current_daily == o.current_daily && current_daily_auto_order == o.current_daily_auto_order && current_monthly == o.current_monthly && customer_service_email == o.customer_service_email && customer_service_phone == o.customer_service_phone && day_of_month_restrictions == o.day_of_month_restrictions && day_of_week_restrictions == o.day_of_week_restrictions && deactivate_after_failures == o.deactivate_after_failures && end_date == o.end_date && gateways == o.gateways && maximum_daily == o.maximum_daily && maximum_daily_auto_order == o.maximum_daily_auto_order && maximum_monthly == o.maximum_monthly && next_daily_auto_order_reset == o.next_daily_auto_order_reset && next_daily_reset == o.next_daily_reset && next_monthly_reset == o.next_monthly_reset && order_total == o.order_total && order_total_comparison == o.order_total_comparison && rebill_auto_orders_against_this_rtg_code == o.rebill_auto_orders_against_this_rtg_code && reserve_days == o.reserve_days && reserve_percentage == o.reserve_percentage && reserve_refunded == o.reserve_refunded && reserves_released_through == o.reserves_released_through && rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid && selected_gateway_name == o.selected_gateway_name && show_cascade_codes == o.show_cascade_codes && show_merchant_account_profiles == o.show_merchant_account_profiles && start_date == o.start_date && status == o.status && theme_restrictions == o.theme_restrictions && traffic_percentage == o.traffic_percentage && trial_daily_amount == o.trial_daily_amount && trial_daily_limit == o.trial_daily_limit && trial_monthly_amount == o.trial_monthly_amount && trial_monthly_limit == o.trial_monthly_limit end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 594 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = UltracartClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 660 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 573 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
560 561 562 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 560 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
566 567 568 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 566 def hash [additional_native_currency_codes, auto_order_cancel_unless_response_name, auto_order_cancel_unless_response_values, base_currency_code, cascade_code, cascade_codes, cascade_daily_auto_order_code, charge_appears_on_statement_as, code, current_daily, current_daily_auto_order, current_monthly, customer_service_email, customer_service_phone, day_of_month_restrictions, day_of_week_restrictions, deactivate_after_failures, end_date, gateways, maximum_daily, maximum_daily_auto_order, maximum_monthly, next_daily_auto_order_reset, next_daily_reset, next_monthly_reset, order_total, order_total_comparison, rebill_auto_orders_against_this_rtg_code, reserve_days, reserve_percentage, reserve_refunded, reserves_released_through, rotating_transaction_gateway_oid, selected_gateway_name, show_cascade_codes, show_merchant_account_profiles, start_date, status, theme_restrictions, traffic_percentage, trial_daily_amount, trial_daily_limit, trial_monthly_amount, trial_monthly_limit].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
472 473 474 475 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 472 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
640 641 642 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 640 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
646 647 648 649 650 651 652 653 654 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 646 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
634 635 636 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 634 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
479 480 481 482 483 484 485 |
# File 'lib/ultracart_api/models/rotating_transaction_gateway.rb', line 479 def valid? order_total_comparison_validator = EnumAttributeValidator.new('String', ['<', '<=', '=', '>', '>=']) return false unless order_total_comparison_validator.valid?(@order_total_comparison) status_validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'standby']) return false unless status_validator.valid?(@status) true end |