Class: UltracartClient::RtgSummaryGateway

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/rtg_summary_gateway.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RtgSummaryGateway

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 100

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?(:'cascade_code')
    self.cascade_code = attributes[:'cascade_code']
  end

  if attributes.has_key?(:'code')
    self.code = attributes[:'code']
  end

  if attributes.has_key?(:'delay_auto_orders')
    self.delay_auto_orders = attributes[:'delay_auto_orders']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.has_key?(:'reserve_percentage')
    self.reserve_percentage = attributes[:'reserve_percentage']
  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?(:'show_ultracart_payments_verification')
    self.show_ultracart_payments_verification = attributes[:'show_ultracart_payments_verification']
  end

  if attributes.has_key?(:'show_ultracart_payments_verified')
    self.show_ultracart_payments_verified = attributes[:'show_ultracart_payments_verified']
  end

  if attributes.has_key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.has_key?(:'supports_auth')
    self.supports_auth = attributes[:'supports_auth']
  end

  if attributes.has_key?(:'supports_refund')
    self.supports_refund = attributes[:'supports_refund']
  end

  if attributes.has_key?(:'third_party')
    self.third_party = attributes[:'third_party']
  end

  if attributes.has_key?(:'traffic_percentage')
    self.traffic_percentage = attributes[:'traffic_percentage']
  end

  if attributes.has_key?(:'warning')
    self.warning = attributes[:'warning']
  end

  if attributes.has_key?(:'wepay_account_update_uri')
    self. = attributes[:'wepay_account_update_uri']
  end

  if attributes.has_key?(:'wepay_console_hostname')
    self.wepay_console_hostname = attributes[:'wepay_console_hostname']
  end
end

Instance Attribute Details

#cascade_codeObject

Returns the value of attribute cascade_code.



17
18
19
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 17

def cascade_code
  @cascade_code
end

#codeObject

Returns the value of attribute code.



19
20
21
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 19

def code
  @code
end

#delay_auto_ordersObject

Returns the value of attribute delay_auto_orders.



21
22
23
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 21

def delay_auto_orders
  @delay_auto_orders
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 23

def name
  @name
end

#reserve_percentageObject

Returns the value of attribute reserve_percentage.



25
26
27
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 25

def reserve_percentage
  @reserve_percentage
end

#reserves_released_throughObject

An optional date specifying the date up to which your gateway has released all reserve funds. This aids in profitability reporting.



28
29
30
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 28

def reserves_released_through
  @reserves_released_through
end

#rotating_transaction_gateway_oidObject

Returns the value of attribute rotating_transaction_gateway_oid.



30
31
32
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 30

def rotating_transaction_gateway_oid
  @rotating_transaction_gateway_oid
end

#show_ultracart_payments_verificationObject

Returns the value of attribute show_ultracart_payments_verification.



32
33
34
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 32

def show_ultracart_payments_verification
  @show_ultracart_payments_verification
end

#show_ultracart_payments_verifiedObject

Returns the value of attribute show_ultracart_payments_verified.



34
35
36
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 34

def show_ultracart_payments_verified
  @show_ultracart_payments_verified
end

#statusObject

Returns the value of attribute status.



36
37
38
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 36

def status
  @status
end

#supports_authObject

Returns the value of attribute supports_auth.



38
39
40
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 38

def supports_auth
  @supports_auth
end

#supports_refundObject

Returns the value of attribute supports_refund.



40
41
42
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 40

def supports_refund
  @supports_refund
end

#third_partyObject

Returns the value of attribute third_party.



42
43
44
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 42

def third_party
  @third_party
end

#traffic_percentageObject

Returns the value of attribute traffic_percentage.



44
45
46
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 44

def traffic_percentage
  @traffic_percentage
end

#warningObject

Returns the value of attribute warning.



46
47
48
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 46

def warning
  @warning
end

#wepay_account_update_uriObject

Returns the value of attribute wepay_account_update_uri.



48
49
50
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 48

def 
  @wepay_account_update_uri
end

#wepay_console_hostnameObject

Returns the value of attribute wepay_console_hostname.



50
51
52
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 50

def wepay_console_hostname
  @wepay_console_hostname
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 53

def self.attribute_map
  {
    :'cascade_code' => :'cascade_code',
    :'code' => :'code',
    :'delay_auto_orders' => :'delay_auto_orders',
    :'name' => :'name',
    :'reserve_percentage' => :'reserve_percentage',
    :'reserves_released_through' => :'reserves_released_through',
    :'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid',
    :'show_ultracart_payments_verification' => :'show_ultracart_payments_verification',
    :'show_ultracart_payments_verified' => :'show_ultracart_payments_verified',
    :'status' => :'status',
    :'supports_auth' => :'supports_auth',
    :'supports_refund' => :'supports_refund',
    :'third_party' => :'third_party',
    :'traffic_percentage' => :'traffic_percentage',
    :'warning' => :'warning',
    :'wepay_account_update_uri' => :'wepay_account_update_uri',
    :'wepay_console_hostname' => :'wepay_console_hostname'
  }
end

.swagger_typesObject

Attribute type mapping.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 76

def self.swagger_types
  {
    :'cascade_code' => :'String',
    :'code' => :'String',
    :'delay_auto_orders' => :'String',
    :'name' => :'String',
    :'reserve_percentage' => :'Float',
    :'reserves_released_through' => :'String',
    :'rotating_transaction_gateway_oid' => :'Integer',
    :'show_ultracart_payments_verification' => :'BOOLEAN',
    :'show_ultracart_payments_verified' => :'BOOLEAN',
    :'status' => :'String',
    :'supports_auth' => :'String',
    :'supports_refund' => :'String',
    :'third_party' => :'String',
    :'traffic_percentage' => :'Float',
    :'warning' => :'String',
    :'wepay_account_update_uri' => :'String',
    :'wepay_console_hostname' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 190

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      cascade_code == o.cascade_code &&
      code == o.code &&
      delay_auto_orders == o.delay_auto_orders &&
      name == o.name &&
      reserve_percentage == o.reserve_percentage &&
      reserves_released_through == o.reserves_released_through &&
      rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid &&
      show_ultracart_payments_verification == o.show_ultracart_payments_verification &&
      show_ultracart_payments_verified == o.show_ultracart_payments_verified &&
      status == o.status &&
      supports_auth == o.supports_auth &&
      supports_refund == o.supports_refund &&
      third_party == o.third_party &&
      traffic_percentage == o.traffic_percentage &&
      warning == o.warning &&
       == o. &&
      wepay_console_hostname == o.wepay_console_hostname
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 248

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 314

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 227

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


214
215
216
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 214

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



220
221
222
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 220

def hash
  [cascade_code, code, delay_auto_orders, name, reserve_percentage, reserves_released_through, rotating_transaction_gateway_oid, show_ultracart_payments_verification, show_ultracart_payments_verified, status, supports_auth, supports_refund, third_party, traffic_percentage, warning, , wepay_console_hostname].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



177
178
179
180
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 177

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



294
295
296
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 294

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



300
301
302
303
304
305
306
307
308
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 300

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



288
289
290
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 288

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



184
185
186
# File 'lib/ultracart_api/models/rtg_summary_gateway.rb', line 184

def valid?
  true
end