cryptopay-ruby 2.0.0 → 2.1.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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +6 -1
  3. data/.rubocop.yml +3 -0
  4. data/README.md +60 -0
  5. data/lib/cryptopay/api/invoices.rb +2 -0
  6. data/lib/cryptopay/api/subscriptions.rb +99 -0
  7. data/lib/cryptopay/client.rb +4 -2
  8. data/lib/cryptopay/models/account.rb +8 -8
  9. data/lib/cryptopay/models/account_list_result.rb +8 -8
  10. data/lib/cryptopay/models/callback.rb +3 -1
  11. data/lib/cryptopay/models/channel.rb +8 -8
  12. data/lib/cryptopay/models/channel_list_result.rb +8 -8
  13. data/lib/cryptopay/models/channel_params.rb +8 -8
  14. data/lib/cryptopay/models/channel_payment.rb +8 -8
  15. data/lib/cryptopay/models/channel_payment_callback.rb +8 -8
  16. data/lib/cryptopay/models/channel_payment_list_result.rb +8 -8
  17. data/lib/cryptopay/models/channel_payment_result.rb +8 -8
  18. data/lib/cryptopay/models/channel_result.rb +8 -8
  19. data/lib/cryptopay/models/channel_update_params.rb +8 -8
  20. data/lib/cryptopay/models/channels_config.rb +8 -8
  21. data/lib/cryptopay/models/coin.rb +8 -8
  22. data/lib/cryptopay/models/coin_destination_tag.rb +8 -8
  23. data/lib/cryptopay/models/coin_list_result.rb +8 -8
  24. data/lib/cryptopay/models/coin_network.rb +8 -8
  25. data/lib/cryptopay/models/coin_withdrawal.rb +8 -8
  26. data/lib/cryptopay/models/coin_withdrawal_callback.rb +8 -8
  27. data/lib/cryptopay/models/coin_withdrawal_list_result.rb +8 -8
  28. data/lib/cryptopay/models/coin_withdrawal_params.rb +8 -8
  29. data/lib/cryptopay/models/coin_withdrawal_result.rb +8 -8
  30. data/lib/cryptopay/models/coin_withdrawals_config.rb +8 -8
  31. data/lib/cryptopay/models/customer.rb +8 -8
  32. data/lib/cryptopay/models/customer_address.rb +8 -8
  33. data/lib/cryptopay/models/customer_list_result.rb +8 -8
  34. data/lib/cryptopay/models/customer_params.rb +8 -8
  35. data/lib/cryptopay/models/customer_result.rb +8 -8
  36. data/lib/cryptopay/models/customer_update_params.rb +8 -8
  37. data/lib/cryptopay/models/exchange.rb +8 -8
  38. data/lib/cryptopay/models/exchange_transfer.rb +8 -8
  39. data/lib/cryptopay/models/exchange_transfer_params.rb +8 -8
  40. data/lib/cryptopay/models/exchange_transfer_result.rb +8 -8
  41. data/lib/cryptopay/models/invoice.rb +15 -8
  42. data/lib/cryptopay/models/invoice_callback.rb +8 -8
  43. data/lib/cryptopay/models/invoice_list_result.rb +8 -8
  44. data/lib/cryptopay/models/invoice_params.rb +17 -10
  45. data/lib/cryptopay/models/invoice_recalculation.rb +8 -8
  46. data/lib/cryptopay/models/invoice_recalculation_params.rb +8 -8
  47. data/lib/cryptopay/models/invoice_recalculation_result.rb +8 -8
  48. data/lib/cryptopay/models/invoice_refund.rb +8 -8
  49. data/lib/cryptopay/models/invoice_refund_list_result.rb +8 -8
  50. data/lib/cryptopay/models/invoice_refund_params.rb +8 -8
  51. data/lib/cryptopay/models/invoice_refund_result.rb +8 -8
  52. data/lib/cryptopay/models/invoice_result.rb +8 -8
  53. data/lib/cryptopay/models/invoice_transaction.rb +8 -8
  54. data/lib/cryptopay/models/invoices_config.rb +8 -8
  55. data/lib/cryptopay/models/network_fee.rb +8 -8
  56. data/lib/cryptopay/models/network_fee_list_result.rb +8 -8
  57. data/lib/cryptopay/models/pagination.rb +8 -8
  58. data/lib/cryptopay/models/rate.rb +8 -8
  59. data/lib/cryptopay/models/rate_result.rb +8 -8
  60. data/lib/cryptopay/models/rates_result.rb +8 -8
  61. data/lib/cryptopay/models/risk.rb +8 -8
  62. data/lib/cryptopay/models/risk_params.rb +8 -8
  63. data/lib/cryptopay/models/risk_result.rb +8 -8
  64. data/lib/cryptopay/models/subscription.rb +222 -0
  65. data/lib/cryptopay/models/subscription_callback.rb +88 -0
  66. data/lib/cryptopay/models/subscription_callback_event.rb +18 -0
  67. data/lib/cryptopay/models/subscription_list_result.rb +82 -0
  68. data/lib/cryptopay/models/subscription_params.rb +159 -0
  69. data/lib/cryptopay/models/subscription_period.rb +20 -0
  70. data/lib/cryptopay/models/subscription_result.rb +68 -0
  71. data/lib/cryptopay/models/subscription_status.rb +18 -0
  72. data/lib/cryptopay/models/transaction.rb +8 -8
  73. data/lib/cryptopay/models/transaction_list_result.rb +8 -8
  74. data/lib/cryptopay/require.rb +9 -0
  75. data/lib/cryptopay/version.rb +1 -1
  76. metadata +15 -6
@@ -19,6 +19,14 @@ module Cryptopay
19
19
  )
20
20
  private_constant :ENCODER
21
21
 
22
+ # Builds the object from hash
23
+ # @param [Hash] attributes Model attributes in the form of hash
24
+ # @return [Cryptopay::InvoiceListResult] Returns the model itself
25
+ def self.build_from_hash(data)
26
+ attributes = ENCODER.build_from_hash(data)
27
+ new(attributes)
28
+ end
29
+
22
30
  # Initializes the object
23
31
  # @param [Hash] attributes Model attributes in the form of hash
24
32
  def initialize(attributes = {})
@@ -61,14 +69,6 @@ module Cryptopay
61
69
  invalid_properties.empty?
62
70
  end
63
71
 
64
- # Builds the object from hash
65
- # @param [Hash] attributes Model attributes in the form of hash
66
- # @return [Cryptopay::InvoiceListResult] Returns the model itself
67
- def self.build_from_hash(data)
68
- attributes = ENCODER.build_from_hash(data)
69
- new(attributes)
70
- end
71
-
72
72
  # Returns the object in the form of hash
73
73
  # @return [Hash] Returns the object in the form of hash
74
74
  def to_hash
@@ -18,7 +18,8 @@ module Cryptopay
18
18
  'description': :description,
19
19
  'metadata': :metadata,
20
20
  'success_redirect_url': :success_redirect_url,
21
- 'unsuccess_redirect_url': :unsuccess_redirect_url
21
+ 'unsuccess_redirect_url': :unsuccess_redirect_url,
22
+ 'payer_email': :payer_email
22
23
  },
23
24
  types: {
24
25
  'price_amount': :Decimal,
@@ -31,12 +32,21 @@ module Cryptopay
31
32
  'description': :String,
32
33
  'metadata': :'Hash<String, String>',
33
34
  'success_redirect_url': :String,
34
- 'unsuccess_redirect_url': :String
35
+ 'unsuccess_redirect_url': :String,
36
+ 'payer_email': :String
35
37
  },
36
38
  nullables: []
37
39
  )
38
40
  private_constant :ENCODER
39
41
 
42
+ # Builds the object from hash
43
+ # @param [Hash] attributes Model attributes in the form of hash
44
+ # @return [Cryptopay::InvoiceParams] Returns the model itself
45
+ def self.build_from_hash(data)
46
+ attributes = ENCODER.build_from_hash(data)
47
+ new(attributes)
48
+ end
49
+
40
50
  # Initializes the object
41
51
  # @param [Hash] attributes Model attributes in the form of hash
42
52
  def initialize(attributes = {})
@@ -97,6 +107,11 @@ module Cryptopay
97
107
  @attributes[:unsuccess_redirect_url]
98
108
  end
99
109
 
110
+ # Email of payer
111
+ def payer_email
112
+ @attributes[:payer_email]
113
+ end
114
+
100
115
  # Show invalid properties with the reasons. Usually used together with valid?
101
116
  # @return Array for valid properties with the reasons
102
117
  def invalid_properties
@@ -117,14 +132,6 @@ module Cryptopay
117
132
  invalid_properties.empty?
118
133
  end
119
134
 
120
- # Builds the object from hash
121
- # @param [Hash] attributes Model attributes in the form of hash
122
- # @return [Cryptopay::InvoiceParams] Returns the model itself
123
- def self.build_from_hash(data)
124
- attributes = ENCODER.build_from_hash(data)
125
- new(attributes)
126
- end
127
-
128
135
  # Returns the object in the form of hash
129
136
  # @return [Hash] Returns the object in the form of hash
130
137
  def to_hash
@@ -43,6 +43,14 @@ module Cryptopay
43
43
  )
44
44
  private_constant :ENCODER
45
45
 
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Cryptopay::InvoiceRecalculation] Returns the model itself
49
+ def self.build_from_hash(data)
50
+ attributes = ENCODER.build_from_hash(data)
51
+ new(attributes)
52
+ end
53
+
46
54
  # Initializes the object
47
55
  # @param [Hash] attributes Model attributes in the form of hash
48
56
  def initialize(attributes = {})
@@ -157,14 +165,6 @@ module Cryptopay
157
165
  invalid_properties.empty?
158
166
  end
159
167
 
160
- # Builds the object from hash
161
- # @param [Hash] attributes Model attributes in the form of hash
162
- # @return [Cryptopay::InvoiceRecalculation] Returns the model itself
163
- def self.build_from_hash(data)
164
- attributes = ENCODER.build_from_hash(data)
165
- new(attributes)
166
- end
167
-
168
168
  # Returns the object in the form of hash
169
169
  # @return [Hash] Returns the object in the form of hash
170
170
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceRecalculationParams] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -40,14 +48,6 @@ module Cryptopay
40
48
  invalid_properties.empty?
41
49
  end
42
50
 
43
- # Builds the object from hash
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- # @return [Cryptopay::InvoiceRecalculationParams] Returns the model itself
46
- def self.build_from_hash(data)
47
- attributes = ENCODER.build_from_hash(data)
48
- new(attributes)
49
- end
50
-
51
51
  # Returns the object in the form of hash
52
52
  # @return [Hash] Returns the object in the form of hash
53
53
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceRecalculationResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -47,14 +55,6 @@ module Cryptopay
47
55
  invalid_properties.empty?
48
56
  end
49
57
 
50
- # Builds the object from hash
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- # @return [Cryptopay::InvoiceRecalculationResult] Returns the model itself
53
- def self.build_from_hash(data)
54
- attributes = ENCODER.build_from_hash(data)
55
- new(attributes)
56
- end
57
-
58
58
  # Returns the object in the form of hash
59
59
  # @return [Hash] Returns the object in the form of hash
60
60
  def to_hash
@@ -43,6 +43,14 @@ module Cryptopay
43
43
  )
44
44
  private_constant :ENCODER
45
45
 
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Cryptopay::InvoiceRefund] Returns the model itself
49
+ def self.build_from_hash(data)
50
+ attributes = ENCODER.build_from_hash(data)
51
+ new(attributes)
52
+ end
53
+
46
54
  # Initializes the object
47
55
  # @param [Hash] attributes Model attributes in the form of hash
48
56
  def initialize(attributes = {})
@@ -142,14 +150,6 @@ module Cryptopay
142
150
  invalid_properties.empty?
143
151
  end
144
152
 
145
- # Builds the object from hash
146
- # @param [Hash] attributes Model attributes in the form of hash
147
- # @return [Cryptopay::InvoiceRefund] Returns the model itself
148
- def self.build_from_hash(data)
149
- attributes = ENCODER.build_from_hash(data)
150
- new(attributes)
151
- end
152
-
153
153
  # Returns the object in the form of hash
154
154
  # @return [Hash] Returns the object in the form of hash
155
155
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceRefundListResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -49,14 +57,6 @@ module Cryptopay
49
57
  invalid_properties.empty?
50
58
  end
51
59
 
52
- # Builds the object from hash
53
- # @param [Hash] attributes Model attributes in the form of hash
54
- # @return [Cryptopay::InvoiceRefundListResult] Returns the model itself
55
- def self.build_from_hash(data)
56
- attributes = ENCODER.build_from_hash(data)
57
- new(attributes)
58
- end
59
-
60
60
  # Returns the object in the form of hash
61
61
  # @return [Hash] Returns the object in the form of hash
62
62
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceRefundParams] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -40,14 +48,6 @@ module Cryptopay
40
48
  invalid_properties.empty?
41
49
  end
42
50
 
43
- # Builds the object from hash
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- # @return [Cryptopay::InvoiceRefundParams] Returns the model itself
46
- def self.build_from_hash(data)
47
- attributes = ENCODER.build_from_hash(data)
48
- new(attributes)
49
- end
50
-
51
51
  # Returns the object in the form of hash
52
52
  # @return [Hash] Returns the object in the form of hash
53
53
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceRefundResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -47,14 +55,6 @@ module Cryptopay
47
55
  invalid_properties.empty?
48
56
  end
49
57
 
50
- # Builds the object from hash
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- # @return [Cryptopay::InvoiceRefundResult] Returns the model itself
53
- def self.build_from_hash(data)
54
- attributes = ENCODER.build_from_hash(data)
55
- new(attributes)
56
- end
57
-
58
58
  # Returns the object in the form of hash
59
59
  # @return [Hash] Returns the object in the form of hash
60
60
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoiceResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -47,14 +55,6 @@ module Cryptopay
47
55
  invalid_properties.empty?
48
56
  end
49
57
 
50
- # Builds the object from hash
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- # @return [Cryptopay::InvoiceResult] Returns the model itself
53
- def self.build_from_hash(data)
54
- attributes = ENCODER.build_from_hash(data)
55
- new(attributes)
56
- end
57
-
58
58
  # Returns the object in the form of hash
59
59
  # @return [Hash] Returns the object in the form of hash
60
60
  def to_hash
@@ -20,6 +20,14 @@ module Cryptopay
20
20
  )
21
21
  private_constant :ENCODER
22
22
 
23
+ # Builds the object from hash
24
+ # @param [Hash] attributes Model attributes in the form of hash
25
+ # @return [Cryptopay::InvoiceTransaction] Returns the model itself
26
+ def self.build_from_hash(data)
27
+ attributes = ENCODER.build_from_hash(data)
28
+ new(attributes)
29
+ end
30
+
23
31
  # Initializes the object
24
32
  # @param [Hash] attributes Model attributes in the form of hash
25
33
  def initialize(attributes = {})
@@ -55,14 +63,6 @@ module Cryptopay
55
63
  invalid_properties.empty?
56
64
  end
57
65
 
58
- # Builds the object from hash
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- # @return [Cryptopay::InvoiceTransaction] Returns the model itself
61
- def self.build_from_hash(data)
62
- attributes = ENCODER.build_from_hash(data)
63
- new(attributes)
64
- end
65
-
66
66
  # Returns the object in the form of hash
67
67
  # @return [Hash] Returns the object in the form of hash
68
68
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::InvoicesConfig] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -43,14 +51,6 @@ module Cryptopay
43
51
  invalid_properties.empty?
44
52
  end
45
53
 
46
- # Builds the object from hash
47
- # @param [Hash] attributes Model attributes in the form of hash
48
- # @return [Cryptopay::InvoicesConfig] Returns the model itself
49
- def self.build_from_hash(data)
50
- attributes = ENCODER.build_from_hash(data)
51
- new(attributes)
52
- end
53
-
54
54
  # Returns the object in the form of hash
55
55
  # @return [Hash] Returns the object in the form of hash
56
56
  def to_hash
@@ -23,6 +23,14 @@ module Cryptopay
23
23
  )
24
24
  private_constant :ENCODER
25
25
 
26
+ # Builds the object from hash
27
+ # @param [Hash] attributes Model attributes in the form of hash
28
+ # @return [Cryptopay::NetworkFee] Returns the model itself
29
+ def self.build_from_hash(data)
30
+ attributes = ENCODER.build_from_hash(data)
31
+ new(attributes)
32
+ end
33
+
26
34
  # Initializes the object
27
35
  # @param [Hash] attributes Model attributes in the form of hash
28
36
  def initialize(attributes = {})
@@ -71,14 +79,6 @@ module Cryptopay
71
79
  invalid_properties.empty?
72
80
  end
73
81
 
74
- # Builds the object from hash
75
- # @param [Hash] attributes Model attributes in the form of hash
76
- # @return [Cryptopay::NetworkFee] Returns the model itself
77
- def self.build_from_hash(data)
78
- attributes = ENCODER.build_from_hash(data)
79
- new(attributes)
80
- end
81
-
82
82
  # Returns the object in the form of hash
83
83
  # @return [Hash] Returns the object in the form of hash
84
84
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::NetworkFeeListResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -49,14 +57,6 @@ module Cryptopay
49
57
  invalid_properties.empty?
50
58
  end
51
59
 
52
- # Builds the object from hash
53
- # @param [Hash] attributes Model attributes in the form of hash
54
- # @return [Cryptopay::NetworkFeeListResult] Returns the model itself
55
- def self.build_from_hash(data)
56
- attributes = ENCODER.build_from_hash(data)
57
- new(attributes)
58
- end
59
-
60
60
  # Returns the object in the form of hash
61
61
  # @return [Hash] Returns the object in the form of hash
62
62
  def to_hash
@@ -19,6 +19,14 @@ module Cryptopay
19
19
  )
20
20
  private_constant :ENCODER
21
21
 
22
+ # Builds the object from hash
23
+ # @param [Hash] attributes Model attributes in the form of hash
24
+ # @return [Cryptopay::Pagination] Returns the model itself
25
+ def self.build_from_hash(data)
26
+ attributes = ENCODER.build_from_hash(data)
27
+ new(attributes)
28
+ end
29
+
22
30
  # Initializes the object
23
31
  # @param [Hash] attributes Model attributes in the form of hash
24
32
  def initialize(attributes = {})
@@ -51,14 +59,6 @@ module Cryptopay
51
59
  invalid_properties.empty?
52
60
  end
53
61
 
54
- # Builds the object from hash
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- # @return [Cryptopay::Pagination] Returns the model itself
57
- def self.build_from_hash(data)
58
- attributes = ENCODER.build_from_hash(data)
59
- new(attributes)
60
- end
61
-
62
62
  # Returns the object in the form of hash
63
63
  # @return [Hash] Returns the object in the form of hash
64
64
  def to_hash
@@ -19,6 +19,14 @@ module Cryptopay
19
19
  )
20
20
  private_constant :ENCODER
21
21
 
22
+ # Builds the object from hash
23
+ # @param [Hash] attributes Model attributes in the form of hash
24
+ # @return [Cryptopay::Rate] Returns the model itself
25
+ def self.build_from_hash(data)
26
+ attributes = ENCODER.build_from_hash(data)
27
+ new(attributes)
28
+ end
29
+
22
30
  # Initializes the object
23
31
  # @param [Hash] attributes Model attributes in the form of hash
24
32
  def initialize(attributes = {})
@@ -53,14 +61,6 @@ module Cryptopay
53
61
  invalid_properties.empty?
54
62
  end
55
63
 
56
- # Builds the object from hash
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- # @return [Cryptopay::Rate] Returns the model itself
59
- def self.build_from_hash(data)
60
- attributes = ENCODER.build_from_hash(data)
61
- new(attributes)
62
- end
63
-
64
64
  # Returns the object in the form of hash
65
65
  # @return [Hash] Returns the object in the form of hash
66
66
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::RateResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -47,14 +55,6 @@ module Cryptopay
47
55
  invalid_properties.empty?
48
56
  end
49
57
 
50
- # Builds the object from hash
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- # @return [Cryptopay::RateResult] Returns the model itself
53
- def self.build_from_hash(data)
54
- attributes = ENCODER.build_from_hash(data)
55
- new(attributes)
56
- end
57
-
58
58
  # Returns the object in the form of hash
59
59
  # @return [Hash] Returns the object in the form of hash
60
60
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::RatesResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -43,14 +51,6 @@ module Cryptopay
43
51
  invalid_properties.empty?
44
52
  end
45
53
 
46
- # Builds the object from hash
47
- # @param [Hash] attributes Model attributes in the form of hash
48
- # @return [Cryptopay::RatesResult] Returns the model itself
49
- def self.build_from_hash(data)
50
- attributes = ENCODER.build_from_hash(data)
51
- new(attributes)
52
- end
53
-
54
54
  # Returns the object in the form of hash
55
55
  # @return [Hash] Returns the object in the form of hash
56
56
  def to_hash
@@ -24,6 +24,14 @@ module Cryptopay
24
24
  )
25
25
  private_constant :ENCODER
26
26
 
27
+ # Builds the object from hash
28
+ # @param [Hash] attributes Model attributes in the form of hash
29
+ # @return [Cryptopay::Risk] Returns the model itself
30
+ def self.build_from_hash(data)
31
+ attributes = ENCODER.build_from_hash(data)
32
+ new(attributes)
33
+ end
34
+
27
35
  # Initializes the object
28
36
  # @param [Hash] attributes Model attributes in the form of hash
29
37
  def initialize(attributes = {})
@@ -77,14 +85,6 @@ module Cryptopay
77
85
  invalid_properties.empty?
78
86
  end
79
87
 
80
- # Builds the object from hash
81
- # @param [Hash] attributes Model attributes in the form of hash
82
- # @return [Cryptopay::Risk] Returns the model itself
83
- def self.build_from_hash(data)
84
- attributes = ENCODER.build_from_hash(data)
85
- new(attributes)
86
- end
87
-
88
88
  # Returns the object in the form of hash
89
89
  # @return [Hash] Returns the object in the form of hash
90
90
  def to_hash
@@ -21,6 +21,14 @@ module Cryptopay
21
21
  )
22
22
  private_constant :ENCODER
23
23
 
24
+ # Builds the object from hash
25
+ # @param [Hash] attributes Model attributes in the form of hash
26
+ # @return [Cryptopay::RiskParams] Returns the model itself
27
+ def self.build_from_hash(data)
28
+ attributes = ENCODER.build_from_hash(data)
29
+ new(attributes)
30
+ end
31
+
24
32
  # Initializes the object
25
33
  # @param [Hash] attributes Model attributes in the form of hash
26
34
  def initialize(attributes = {})
@@ -65,14 +73,6 @@ module Cryptopay
65
73
  invalid_properties.empty?
66
74
  end
67
75
 
68
- # Builds the object from hash
69
- # @param [Hash] attributes Model attributes in the form of hash
70
- # @return [Cryptopay::RiskParams] Returns the model itself
71
- def self.build_from_hash(data)
72
- attributes = ENCODER.build_from_hash(data)
73
- new(attributes)
74
- end
75
-
76
76
  # Returns the object in the form of hash
77
77
  # @return [Hash] Returns the object in the form of hash
78
78
  def to_hash
@@ -17,6 +17,14 @@ module Cryptopay
17
17
  )
18
18
  private_constant :ENCODER
19
19
 
20
+ # Builds the object from hash
21
+ # @param [Hash] attributes Model attributes in the form of hash
22
+ # @return [Cryptopay::RiskResult] Returns the model itself
23
+ def self.build_from_hash(data)
24
+ attributes = ENCODER.build_from_hash(data)
25
+ new(attributes)
26
+ end
27
+
20
28
  # Initializes the object
21
29
  # @param [Hash] attributes Model attributes in the form of hash
22
30
  def initialize(attributes = {})
@@ -47,14 +55,6 @@ module Cryptopay
47
55
  invalid_properties.empty?
48
56
  end
49
57
 
50
- # Builds the object from hash
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- # @return [Cryptopay::RiskResult] Returns the model itself
53
- def self.build_from_hash(data)
54
- attributes = ENCODER.build_from_hash(data)
55
- new(attributes)
56
- end
57
-
58
58
  # Returns the object in the form of hash
59
59
  # @return [Hash] Returns the object in the form of hash
60
60
  def to_hash