Class: Solifyn::WebhookPaymentPayload

Inherits:
Object
  • Object
show all
Defined in:
lib/solifyn/models/webhook_payment_payload.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WebhookPaymentPayload

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
270
271
272
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
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 245

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::WebhookPaymentPayload` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::WebhookPaymentPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

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

  if attributes.key?(:'substatus')
    self.substatus = attributes[:'substatus']
  end

  if attributes.key?(:'customer_id')
    self.customer_id = attributes[:'customer_id']
  end

  if attributes.key?(:'customer_email')
    self.customer_email = attributes[:'customer_email']
  end

  if attributes.key?(:'customer_name')
    self.customer_name = attributes[:'customer_name']
  end

  if attributes.key?(:'customer_username')
    self.customer_username = attributes[:'customer_username']
  end

  if attributes.key?(:'product_title')
    self.product_title = attributes[:'product_title']
  end

  if attributes.key?(:'product_route')
    self.product_route = attributes[:'product_route']
  end

  if attributes.key?(:'plan_id')
    self.plan_id = attributes[:'plan_id']
  end

  if attributes.key?(:'membership_id')
    self.membership_id = attributes[:'membership_id']
  end

  if attributes.key?(:'membership_status')
    self.membership_status = attributes[:'membership_status']
  end

  if attributes.key?(:'billing_reason')
    self.billing_reason = attributes[:'billing_reason']
  end

  if attributes.key?(:'amount')
    self.amount = attributes[:'amount']
  end

  if attributes.key?(:'subtotal')
    self.subtotal = attributes[:'subtotal']
  end

  if attributes.key?(:'usd_total')
    self.usd_total = attributes[:'usd_total']
  end

  if attributes.key?(:'fee_amount')
    self.fee_amount = attributes[:'fee_amount']
  end

  if attributes.key?(:'amount_after_fees')
    self.amount_after_fees = attributes[:'amount_after_fees']
  end

  if attributes.key?(:'tax_amount')
    self.tax_amount = attributes[:'tax_amount']
  end

  if attributes.key?(:'tax_behavior')
    self.tax_behavior = attributes[:'tax_behavior']
  end

  if attributes.key?(:'tax_refunded_amount')
    self.tax_refunded_amount = attributes[:'tax_refunded_amount']
  end

  if attributes.key?(:'refunded_amount')
    self.refunded_amount = attributes[:'refunded_amount']
  end

  if attributes.key?(:'settlement_amount')
    self.settlement_amount = attributes[:'settlement_amount']
  end

  if attributes.key?(:'settlement_currency')
    self.settlement_currency = attributes[:'settlement_currency']
  end

  if attributes.key?(:'settlement_exchange_rate')
    self.settlement_exchange_rate = attributes[:'settlement_exchange_rate']
  end

  if attributes.key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.key?(:'refundable')
    self.refundable = attributes[:'refundable']
  end

  if attributes.key?(:'retryable')
    self.retryable = attributes[:'retryable']
  end

  if attributes.key?(:'auto_refunded')
    self.auto_refunded = attributes[:'auto_refunded']
  end

  if attributes.key?(:'payment_method')
    self.payment_method = attributes[:'payment_method']
  end

  if attributes.key?(:'card_brand')
    self.card_brand = attributes[:'card_brand']
  end

  if attributes.key?(:'card_last4')
    self.card_last4 = attributes[:'card_last4']
  end

  if attributes.key?(:'card_exp_month')
    self.card_exp_month = attributes[:'card_exp_month']
  end

  if attributes.key?(:'card_exp_year')
    self.card_exp_year = attributes[:'card_exp_year']
  end

  if attributes.key?(:'billing_address')
    self.billing_address = attributes[:'billing_address']
  end

  if attributes.key?(:'license_key')
    self.license_key = attributes[:'license_key']
  end

  if attributes.key?(:'files_snapshot')
    if (value = attributes[:'files_snapshot']).is_a?(Array)
      self.files_snapshot = value
    end
  end

  if attributes.key?(:'checkout_id')
    self.checkout_id = attributes[:'checkout_id']
  end

  if attributes.key?(:'discount_code')
    self.discount_code = attributes[:'discount_code']
  end

  if attributes.key?(:'failure_message')
    self.failure_message = attributes[:'failure_message']
  end

  if attributes.key?(:'paid_at')
    self.paid_at = attributes[:'paid_at']
  end

  if attributes.key?(:'refunded_at')
    self.refunded_at = attributes[:'refunded_at']
  end

  if attributes.key?(:'dispute_alerted_at')
    self.dispute_alerted_at = attributes[:'dispute_alerted_at']
  end

  if attributes.key?(:'last_payment_attempt')
    self.last_payment_attempt = attributes[:'last_payment_attempt']
  end

  if attributes.key?(:'next_payment_attempt')
    self.next_payment_attempt = attributes[:'next_payment_attempt']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  end

  if attributes.key?(:'payment_event_type')
    self.payment_event_type = attributes[:'payment_event_type']
  end

  if attributes.key?(:'last_event_type')
    self.last_event_type = attributes[:'last_event_type']
  end

  if attributes.key?(:'business_id')
    self.business_id = attributes[:'business_id']
  end
end

Instance Attribute Details

#amountObject

Dollar value, 2 d.p.



46
47
48
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 46

def amount
  @amount
end

#amount_after_feesObject

Returns the value of attribute amount_after_fees.



54
55
56
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 54

def amount_after_fees
  @amount_after_fees
end

#auto_refundedObject

Returns the value of attribute auto_refunded.



76
77
78
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 76

def auto_refunded
  @auto_refunded
end

#billing_addressObject

Returns the value of attribute billing_address.



88
89
90
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 88

def billing_address
  @billing_address
end

#billing_reasonObject

Returns the value of attribute billing_reason.



43
44
45
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 43

def billing_reason
  @billing_reason
end

#business_idObject

Returns the value of attribute business_id.



118
119
120
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 118

def business_id
  @business_id
end

#card_brandObject

Returns the value of attribute card_brand.



80
81
82
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 80

def card_brand
  @card_brand
end

#card_exp_monthObject

Returns the value of attribute card_exp_month.



84
85
86
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 84

def card_exp_month
  @card_exp_month
end

#card_exp_yearObject

Returns the value of attribute card_exp_year.



86
87
88
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 86

def card_exp_year
  @card_exp_year
end

#card_last4Object

Returns the value of attribute card_last4.



82
83
84
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 82

def card_last4
  @card_last4
end

#checkout_idObject

Returns the value of attribute checkout_id.



94
95
96
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 94

def checkout_id
  @checkout_id
end

#created_atObject

Returns the value of attribute created_at.



110
111
112
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 110

def created_at
  @created_at
end

#currencyObject

Returns the value of attribute currency.



70
71
72
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 70

def currency
  @currency
end

#customer_emailObject

Returns the value of attribute customer_email.



27
28
29
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 27

def customer_email
  @customer_email
end

#customer_idObject

Returns the value of attribute customer_id.



25
26
27
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 25

def customer_id
  @customer_id
end

#customer_nameObject

Returns the value of attribute customer_name.



29
30
31
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 29

def customer_name
  @customer_name
end

#customer_usernameObject

Returns the value of attribute customer_username.



31
32
33
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 31

def customer_username
  @customer_username
end

#discount_codeObject

Returns the value of attribute discount_code.



96
97
98
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 96

def discount_code
  @discount_code
end

#dispute_alerted_atObject

Returns the value of attribute dispute_alerted_at.



104
105
106
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 104

def dispute_alerted_at
  @dispute_alerted_at
end

#failure_messageObject

Returns the value of attribute failure_message.



98
99
100
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 98

def failure_message
  @failure_message
end

#fee_amountObject

Returns the value of attribute fee_amount.



52
53
54
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 52

def fee_amount
  @fee_amount
end

#files_snapshotObject

Returns the value of attribute files_snapshot.



92
93
94
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 92

def files_snapshot
  @files_snapshot
end

#idObject

Internal payment ID.



19
20
21
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 19

def id
  @id
end

#last_event_typeObject

Returns the value of attribute last_event_type.



116
117
118
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 116

def last_event_type
  @last_event_type
end

#last_payment_attemptObject

Returns the value of attribute last_payment_attempt.



106
107
108
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 106

def last_payment_attempt
  @last_payment_attempt
end

#license_keyObject

Returns the value of attribute license_key.



90
91
92
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 90

def license_key
  @license_key
end

#membership_idObject

Returns the value of attribute membership_id.



39
40
41
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 39

def membership_id
  @membership_id
end

#membership_statusObject

Returns the value of attribute membership_status.



41
42
43
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 41

def membership_status
  @membership_status
end

#next_payment_attemptObject

Returns the value of attribute next_payment_attempt.



108
109
110
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 108

def next_payment_attempt
  @next_payment_attempt
end

Returns the value of attribute paid_at.



100
101
102
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 100

def paid_at
  @paid_at
end

#payment_event_typeObject

Returns the value of attribute payment_event_type.



114
115
116
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 114

def payment_event_type
  @payment_event_type
end

#payment_methodObject

Returns the value of attribute payment_method.



78
79
80
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 78

def payment_method
  @payment_method
end

#plan_idObject

Returns the value of attribute plan_id.



37
38
39
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 37

def plan_id
  @plan_id
end

#product_routeObject

Returns the value of attribute product_route.



35
36
37
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 35

def product_route
  @product_route
end

#product_titleObject

Returns the value of attribute product_title.



33
34
35
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 33

def product_title
  @product_title
end

#refundableObject

Returns the value of attribute refundable.



72
73
74
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 72

def refundable
  @refundable
end

#refunded_amountObject

Returns the value of attribute refunded_amount.



62
63
64
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 62

def refunded_amount
  @refunded_amount
end

#refunded_atObject

Returns the value of attribute refunded_at.



102
103
104
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 102

def refunded_at
  @refunded_at
end

#retryableObject

Returns the value of attribute retryable.



74
75
76
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 74

def retryable
  @retryable
end

#settlement_amountObject

Returns the value of attribute settlement_amount.



64
65
66
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 64

def settlement_amount
  @settlement_amount
end

#settlement_currencyObject

Returns the value of attribute settlement_currency.



66
67
68
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 66

def settlement_currency
  @settlement_currency
end

#settlement_exchange_rateObject

Returns the value of attribute settlement_exchange_rate.



68
69
70
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 68

def settlement_exchange_rate
  @settlement_exchange_rate
end

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 21

def status
  @status
end

#substatusObject

Returns the value of attribute substatus.



23
24
25
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 23

def substatus
  @substatus
end

#subtotalObject

Returns the value of attribute subtotal.



48
49
50
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 48

def subtotal
  @subtotal
end

#tax_amountObject

Returns the value of attribute tax_amount.



56
57
58
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 56

def tax_amount
  @tax_amount
end

#tax_behaviorObject

Returns the value of attribute tax_behavior.



58
59
60
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 58

def tax_behavior
  @tax_behavior
end

#tax_refunded_amountObject

Returns the value of attribute tax_refunded_amount.



60
61
62
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 60

def tax_refunded_amount
  @tax_refunded_amount
end

#updated_atObject

Returns the value of attribute updated_at.



112
113
114
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 112

def updated_at
  @updated_at
end

#usd_totalObject

Returns the value of attribute usd_total.



50
51
52
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 50

def usd_total
  @usd_total
end

Class Method Details

._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



572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 572

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.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
    # models (e.g. Pet) or oneOf
    klass = Solifyn.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



177
178
179
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 177

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
174
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 121

def self.attribute_map
  {
    :'id' => :'id',
    :'status' => :'status',
    :'substatus' => :'substatus',
    :'customer_id' => :'customerId',
    :'customer_email' => :'customerEmail',
    :'customer_name' => :'customerName',
    :'customer_username' => :'customerUsername',
    :'product_title' => :'productTitle',
    :'product_route' => :'productRoute',
    :'plan_id' => :'planId',
    :'membership_id' => :'membershipId',
    :'membership_status' => :'membershipStatus',
    :'billing_reason' => :'billingReason',
    :'amount' => :'amount',
    :'subtotal' => :'subtotal',
    :'usd_total' => :'usdTotal',
    :'fee_amount' => :'feeAmount',
    :'amount_after_fees' => :'amountAfterFees',
    :'tax_amount' => :'taxAmount',
    :'tax_behavior' => :'taxBehavior',
    :'tax_refunded_amount' => :'taxRefundedAmount',
    :'refunded_amount' => :'refundedAmount',
    :'settlement_amount' => :'settlementAmount',
    :'settlement_currency' => :'settlementCurrency',
    :'settlement_exchange_rate' => :'settlementExchangeRate',
    :'currency' => :'currency',
    :'refundable' => :'refundable',
    :'retryable' => :'retryable',
    :'auto_refunded' => :'autoRefunded',
    :'payment_method' => :'paymentMethod',
    :'card_brand' => :'cardBrand',
    :'card_last4' => :'cardLast4',
    :'card_exp_month' => :'cardExpMonth',
    :'card_exp_year' => :'cardExpYear',
    :'billing_address' => :'billingAddress',
    :'license_key' => :'licenseKey',
    :'files_snapshot' => :'filesSnapshot',
    :'checkout_id' => :'checkoutId',
    :'discount_code' => :'discountCode',
    :'failure_message' => :'failureMessage',
    :'paid_at' => :'paidAt',
    :'refunded_at' => :'refundedAt',
    :'dispute_alerted_at' => :'disputeAlertedAt',
    :'last_payment_attempt' => :'lastPaymentAttempt',
    :'next_payment_attempt' => :'nextPaymentAttempt',
    :'created_at' => :'createdAt',
    :'updated_at' => :'updatedAt',
    :'payment_event_type' => :'paymentEventType',
    :'last_event_type' => :'lastEventType',
    :'business_id' => :'businessId'
  }
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



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 548

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif 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[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



238
239
240
241
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 238

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 182

def self.openapi_types
  {
    :'id' => :'String',
    :'status' => :'String',
    :'substatus' => :'String',
    :'customer_id' => :'String',
    :'customer_email' => :'String',
    :'customer_name' => :'String',
    :'customer_username' => :'String',
    :'product_title' => :'String',
    :'product_route' => :'String',
    :'plan_id' => :'String',
    :'membership_id' => :'String',
    :'membership_status' => :'String',
    :'billing_reason' => :'String',
    :'amount' => :'String',
    :'subtotal' => :'String',
    :'usd_total' => :'String',
    :'fee_amount' => :'String',
    :'amount_after_fees' => :'String',
    :'tax_amount' => :'String',
    :'tax_behavior' => :'String',
    :'tax_refunded_amount' => :'String',
    :'refunded_amount' => :'String',
    :'settlement_amount' => :'String',
    :'settlement_currency' => :'String',
    :'settlement_exchange_rate' => :'String',
    :'currency' => :'String',
    :'refundable' => :'Boolean',
    :'retryable' => :'Boolean',
    :'auto_refunded' => :'Boolean',
    :'payment_method' => :'String',
    :'card_brand' => :'String',
    :'card_last4' => :'String',
    :'card_exp_month' => :'Integer',
    :'card_exp_year' => :'Integer',
    :'billing_address' => :'WebhookPaymentPayloadBillingAddress',
    :'license_key' => :'String',
    :'files_snapshot' => :'Array<Object>',
    :'checkout_id' => :'String',
    :'discount_code' => :'String',
    :'failure_message' => :'String',
    :'paid_at' => :'Time',
    :'refunded_at' => :'Time',
    :'dispute_alerted_at' => :'Time',
    :'last_payment_attempt' => :'Time',
    :'next_payment_attempt' => :'Time',
    :'created_at' => :'Time',
    :'updated_at' => :'Time',
    :'payment_event_type' => :'String',
    :'last_event_type' => :'String',
    :'business_id' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 478

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      status == o.status &&
      substatus == o.substatus &&
      customer_id == o.customer_id &&
      customer_email == o.customer_email &&
      customer_name == o.customer_name &&
      customer_username == o.customer_username &&
      product_title == o.product_title &&
      product_route == o.product_route &&
      plan_id == o.plan_id &&
      membership_id == o.membership_id &&
      membership_status == o.membership_status &&
      billing_reason == o.billing_reason &&
      amount == o.amount &&
      subtotal == o.subtotal &&
      usd_total == o.usd_total &&
      fee_amount == o.fee_amount &&
      amount_after_fees == o.amount_after_fees &&
      tax_amount == o.tax_amount &&
      tax_behavior == o.tax_behavior &&
      tax_refunded_amount == o.tax_refunded_amount &&
      refunded_amount == o.refunded_amount &&
      settlement_amount == o.settlement_amount &&
      settlement_currency == o.settlement_currency &&
      settlement_exchange_rate == o.settlement_exchange_rate &&
      currency == o.currency &&
      refundable == o.refundable &&
      retryable == o.retryable &&
      auto_refunded == o.auto_refunded &&
      payment_method == o.payment_method &&
      card_brand == o.card_brand &&
      card_last4 == o.card_last4 &&
      card_exp_month == o.card_exp_month &&
      card_exp_year == o.card_exp_year &&
      billing_address == o.billing_address &&
      license_key == o.license_key &&
      files_snapshot == o.files_snapshot &&
      checkout_id == o.checkout_id &&
      discount_code == o.discount_code &&
      failure_message == o.failure_message &&
      paid_at == o.paid_at &&
      refunded_at == o.refunded_at &&
      dispute_alerted_at == o.dispute_alerted_at &&
      last_payment_attempt == o.last_payment_attempt &&
      next_payment_attempt == o.next_payment_attempt &&
      created_at == o.created_at &&
      updated_at == o.updated_at &&
      payment_event_type == o.payment_event_type &&
      last_event_type == o.last_event_type &&
      business_id == o.business_id
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



643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 643

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

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


535
536
537
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 535

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



541
542
543
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 541

def hash
  [id, status, substatus, customer_id, customer_email, customer_name, customer_username, product_title, product_route, plan_id, membership_id, membership_status, billing_reason, amount, subtotal, usd_total, fee_amount, amount_after_fees, tax_amount, tax_behavior, tax_refunded_amount, refunded_amount, settlement_amount, settlement_currency, settlement_exchange_rate, currency, refundable, retryable, auto_refunded, payment_method, card_brand, card_last4, card_exp_month, card_exp_year, billing_address, license_key, files_snapshot, checkout_id, discount_code, failure_message, paid_at, refunded_at, dispute_alerted_at, last_payment_attempt, next_payment_attempt, created_at, updated_at, payment_event_type, last_event_type, business_id].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



463
464
465
466
467
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 463

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  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



619
620
621
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 619

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



625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 625

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



613
614
615
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 613

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



471
472
473
474
# File 'lib/solifyn/models/webhook_payment_payload.rb', line 471

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end