onlinepayments-sdk-ruby 10.1.0 → 10.3.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 (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
  3. data/lib/onlinepayments/sdk/communicator.rb +1 -1
  4. data/lib/onlinepayments/sdk/domain/capture_output.rb +28 -0
  5. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +15 -0
  6. data/lib/onlinepayments/sdk/domain/get_payment_links_by_merchant_group_request.rb +68 -0
  7. data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +15 -0
  8. data/lib/onlinepayments/sdk/domain/operation_output.rb +15 -0
  9. data/lib/onlinepayments/sdk/domain/pagination.rb +49 -0
  10. data/lib/onlinepayments/sdk/domain/payment_link_overview_entry.rb +157 -0
  11. data/lib/onlinepayments/sdk/domain/payment_link_overview_filtering.rb +57 -0
  12. data/lib/onlinepayments/sdk/domain/payment_link_overview_response.rb +69 -0
  13. data/lib/onlinepayments/sdk/domain/payment_link_overview_sorting.rb +49 -0
  14. data/lib/onlinepayments/sdk/domain/payment_output.rb +13 -0
  15. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_fields.rb +57 -0
  16. data/lib/onlinepayments/sdk/domain/payout_output.rb +13 -0
  17. data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +43 -0
  18. data/lib/onlinepayments/sdk/domain/refund_output.rb +28 -0
  19. data/lib/onlinepayments/sdk/domain/share_payment_link_request.rb +62 -0
  20. data/lib/onlinepayments/sdk/exception_factory.rb +1 -1
  21. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +7 -7
  22. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +70 -0
  23. data/onlinepayments-sdk-ruby.gemspec +1 -1
  24. metadata +9 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab1d846587d370a86c3dc43664a9c4bccda7fd1e21055467382e7d9b8408c947
4
- data.tar.gz: 3c023e14bd493e2efebad294ee309078b32fe75d98001bcb9eee79b284f0ce23
3
+ metadata.gz: 7bd93655aa73ed86542a6d14d220957e6849a78613edb9bfad6c53c1563cf0c5
4
+ data.tar.gz: 0d1800b7597bd79999a97a3dc11239bd74b56f65dc3519d9254dd0457de5fbda
5
5
  SHA512:
6
- metadata.gz: 76c8ef6205e3e69833e472e0603f3cf6ff0a548e3d70a596e1209a3d30855794fa8bccc9adb3e35405620aea59c42a2d2ceb96edac8219a829ff03bb5de526ae
7
- data.tar.gz: 59cfc469e7f2992ea8d428a3ec37cfebd8e3ece60879ec44bb12cd7a8aa44ee6ebbaec6b29862f0f8be3c185e463e157e44594e8880adc7611459af4a2dad8ad
6
+ metadata.gz: 4fabbb91223bc056a38f726b98c77943024f24a5364faaac5040df2dec86f8950c0caba97af1f4f61613ec7eae492463f4b7d9102f6b65c13ed7e198ec3db0c6
7
+ data.tar.gz: f98a76aa631b0c67159240384fd6e34b5e8dd9e25ab8e98e01bd279f627695c45a4677568eeb9dbd6f10bceb819c4b014bf5e71c0b68921ec11bc61194136f99
@@ -13,7 +13,7 @@ module OnlinePayments
13
13
  class MetadataProvider
14
14
  private
15
15
 
16
- SDK_VERSION = '10.1.0'.freeze
16
+ SDK_VERSION = '10.3.0'.freeze
17
17
  SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
18
18
  PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
19
19
  CHARSET = 'utf-8'.freeze
@@ -430,7 +430,7 @@ module OnlinePayments
430
430
  # which represent the parameter name and value respectively.
431
431
  def to_absolute_uri(relative_path, request_parameters)
432
432
  absolute_path = relative_path.start_with?('/') ? relative_path : '/' + relative_path
433
- uri = URI::HTTP.new(@api_endpoint.scheme, nil, @api_endpoint.host,
433
+ uri = URI::HTTPS.new(@api_endpoint.scheme, nil, @api_endpoint.host,
434
434
  @api_endpoint.port, nil, absolute_path, nil, nil, nil)
435
435
  unless request_parameters.nil?
436
436
  request_parameters.each do |nvp|
@@ -1,6 +1,8 @@
1
1
  #
2
2
  # This file was automatically generated.
3
3
  #
4
+ require 'date'
5
+
4
6
  require 'onlinepayments/sdk/domain/amount_of_money'
5
7
  require 'onlinepayments/sdk/domain/card_payment_method_specific_output'
6
8
  require 'onlinepayments/sdk/domain/data_object'
@@ -21,11 +23,13 @@ module OnlinePayments
21
23
  # @attr [String, nil] merchant_parameters
22
24
  # @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput, nil] mobile_payment_method_specific_output
23
25
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences, nil] operation_references
26
+ # @attr [DateTime, nil] payment_creation_date
24
27
  # @attr [String, nil] payment_method
25
28
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput, nil] redirect_payment_method_specific_output
26
29
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
27
30
  # @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput, nil] sepa_direct_debit_payment_method_specific_output
28
31
  # @attr [OnlinePayments::SDK::Domain::SurchargeSpecificOutput, nil] surcharge_specific_output
32
+ # @attr [DateTime, nil] transaction_date
29
33
  class CaptureOutput < OnlinePayments::SDK::Domain::DataObject
30
34
 
31
35
  attr_accessor :acquired_amount
@@ -43,6 +47,8 @@ module OnlinePayments
43
47
 
44
48
  attr_accessor :operation_references
45
49
 
50
+ attr_accessor :payment_creation_date
51
+
46
52
  attr_accessor :payment_method
47
53
 
48
54
  attr_accessor :redirect_payment_method_specific_output
@@ -53,6 +59,8 @@ module OnlinePayments
53
59
 
54
60
  attr_accessor :surcharge_specific_output
55
61
 
62
+ attr_accessor :transaction_date
63
+
56
64
  # Sets the property and returns this same instance.
57
65
  def with_acquired_amount(value)
58
66
  @acquired_amount = value
@@ -95,6 +103,12 @@ module OnlinePayments
95
103
  self
96
104
  end
97
105
 
106
+ # Sets the property and returns this same instance.
107
+ def with_payment_creation_date(value)
108
+ @payment_creation_date = value
109
+ self
110
+ end
111
+
98
112
  # Sets the property and returns this same instance.
99
113
  def with_payment_method(value)
100
114
  @payment_method = value
@@ -125,6 +139,12 @@ module OnlinePayments
125
139
  self
126
140
  end
127
141
 
142
+ # Sets the property and returns this same instance.
143
+ def with_transaction_date(value)
144
+ @transaction_date = value
145
+ self
146
+ end
147
+
128
148
  # @return (Hash)
129
149
  def to_h
130
150
  hash = super
@@ -135,11 +155,13 @@ module OnlinePayments
135
155
  hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
136
156
  hash['mobilePaymentMethodSpecificOutput'] = @mobile_payment_method_specific_output.to_h unless @mobile_payment_method_specific_output.nil?
137
157
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
158
+ hash['paymentCreationDate'] = @payment_creation_date.iso8601(3) unless @payment_creation_date.nil?
138
159
  hash['paymentMethod'] = @payment_method unless @payment_method.nil?
139
160
  hash['redirectPaymentMethodSpecificOutput'] = @redirect_payment_method_specific_output.to_h unless @redirect_payment_method_specific_output.nil?
140
161
  hash['references'] = @references.to_h unless @references.nil?
141
162
  hash['sepaDirectDebitPaymentMethodSpecificOutput'] = @sepa_direct_debit_payment_method_specific_output.to_h unless @sepa_direct_debit_payment_method_specific_output.nil?
142
163
  hash['surchargeSpecificOutput'] = @surcharge_specific_output.to_h unless @surcharge_specific_output.nil?
164
+ hash['transactionDate'] = @transaction_date.iso8601(3) unless @transaction_date.nil?
143
165
  hash
144
166
  end
145
167
 
@@ -171,6 +193,9 @@ module OnlinePayments
171
193
  raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
172
194
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
173
195
  end
196
+ if hash.has_key? 'paymentCreationDate'
197
+ @payment_creation_date = DateTime.parse(hash['paymentCreationDate'])
198
+ end
174
199
  if hash.has_key? 'paymentMethod'
175
200
  @payment_method = hash['paymentMethod']
176
201
  end
@@ -190,6 +215,9 @@ module OnlinePayments
190
215
  raise TypeError, "value '%s' is not a Hash" % [hash['surchargeSpecificOutput']] unless hash['surchargeSpecificOutput'].is_a? Hash
191
216
  @surcharge_specific_output = OnlinePayments::SDK::Domain::SurchargeSpecificOutput.new_from_hash(hash['surchargeSpecificOutput'])
192
217
  end
218
+ if hash.has_key? 'transactionDate'
219
+ @transaction_date = DateTime.parse(hash['transactionDate'])
220
+ end
193
221
  end
194
222
  end
195
223
  end
@@ -2,12 +2,14 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_product_filters_hosted_fields'
5
6
 
6
7
  module OnlinePayments
7
8
  module SDK
8
9
  module Domain
9
10
  # @attr [String, nil] locale
10
11
  # @attr [String, nil] origin
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentProductFiltersHostedFields, nil] payment_product_filters
11
13
  # @attr [Array<String>, nil] tokens
12
14
  class CreateHostedFieldsSessionRequest < OnlinePayments::SDK::Domain::DataObject
13
15
 
@@ -15,6 +17,8 @@ module OnlinePayments
15
17
 
16
18
  attr_accessor :origin
17
19
 
20
+ attr_accessor :payment_product_filters
21
+
18
22
  attr_accessor :tokens
19
23
 
20
24
  # Sets the property and returns this same instance.
@@ -29,6 +33,12 @@ module OnlinePayments
29
33
  self
30
34
  end
31
35
 
36
+ # Sets the property and returns this same instance.
37
+ def with_payment_product_filters(value)
38
+ @payment_product_filters = value
39
+ self
40
+ end
41
+
32
42
  # Sets the property and returns this same instance.
33
43
  def with_tokens(value)
34
44
  @tokens = value
@@ -40,6 +50,7 @@ module OnlinePayments
40
50
  hash = super
41
51
  hash['locale'] = @locale unless @locale.nil?
42
52
  hash['origin'] = @origin unless @origin.nil?
53
+ hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil?
43
54
  hash['tokens'] = @tokens unless @tokens.nil?
44
55
  hash
45
56
  end
@@ -52,6 +63,10 @@ module OnlinePayments
52
63
  if hash.has_key? 'origin'
53
64
  @origin = hash['origin']
54
65
  end
66
+ if hash.has_key? 'paymentProductFilters'
67
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
68
+ @payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedFields.new_from_hash(hash['paymentProductFilters'])
69
+ end
55
70
  if hash.has_key? 'tokens'
56
71
  raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array
57
72
  @tokens = []
@@ -0,0 +1,68 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/pagination'
6
+ require 'onlinepayments/sdk/domain/payment_link_overview_filtering'
7
+ require 'onlinepayments/sdk/domain/payment_link_overview_sorting'
8
+
9
+ module OnlinePayments
10
+ module SDK
11
+ module Domain
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentLinkOverviewFiltering, nil] filtering
13
+ # @attr [OnlinePayments::SDK::Domain::Pagination, nil] pagination
14
+ # @attr [OnlinePayments::SDK::Domain::PaymentLinkOverviewSorting, nil] sorting
15
+ class GetPaymentLinksByMerchantGroupRequest < OnlinePayments::SDK::Domain::DataObject
16
+
17
+ attr_accessor :filtering
18
+
19
+ attr_accessor :pagination
20
+
21
+ attr_accessor :sorting
22
+
23
+ # Sets the property and returns this same instance.
24
+ def with_filtering(value)
25
+ @filtering = value
26
+ self
27
+ end
28
+
29
+ # Sets the property and returns this same instance.
30
+ def with_pagination(value)
31
+ @pagination = value
32
+ self
33
+ end
34
+
35
+ # Sets the property and returns this same instance.
36
+ def with_sorting(value)
37
+ @sorting = value
38
+ self
39
+ end
40
+
41
+ # @return (Hash)
42
+ def to_h
43
+ hash = super
44
+ hash['filtering'] = @filtering.to_h unless @filtering.nil?
45
+ hash['pagination'] = @pagination.to_h unless @pagination.nil?
46
+ hash['sorting'] = @sorting.to_h unless @sorting.nil?
47
+ hash
48
+ end
49
+
50
+ def from_hash(hash)
51
+ super
52
+ if hash.has_key? 'filtering'
53
+ raise TypeError, "value '%s' is not a Hash" % [hash['filtering']] unless hash['filtering'].is_a? Hash
54
+ @filtering = OnlinePayments::SDK::Domain::PaymentLinkOverviewFiltering.new_from_hash(hash['filtering'])
55
+ end
56
+ if hash.has_key? 'pagination'
57
+ raise TypeError, "value '%s' is not a Hash" % [hash['pagination']] unless hash['pagination'].is_a? Hash
58
+ @pagination = OnlinePayments::SDK::Domain::Pagination.new_from_hash(hash['pagination'])
59
+ end
60
+ if hash.has_key? 'sorting'
61
+ raise TypeError, "value '%s' is not a Hash" % [hash['sorting']] unless hash['sorting'].is_a? Hash
62
+ @sorting = OnlinePayments::SDK::Domain::PaymentLinkOverviewSorting.new_from_hash(hash['sorting'])
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -3,12 +3,14 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/card_data_without_cvv'
5
5
  require 'onlinepayments/sdk/domain/data_object'
6
+ require 'onlinepayments/sdk/domain/network_token_data'
6
7
 
7
8
  module OnlinePayments
8
9
  module SDK
9
10
  module Domain
10
11
  # @attr [OnlinePayments::SDK::Domain::CardDataWithoutCvv, nil] card
11
12
  # @attr [String, nil] currency_code
13
+ # @attr [OnlinePayments::SDK::Domain::NetworkTokenData, nil] network_token_data
12
14
  # @attr [Integer, nil] payment_product_id
13
15
  # @attr [String, nil] scheme_reference_data
14
16
  # @attr [String, nil] token_id
@@ -19,6 +21,8 @@ module OnlinePayments
19
21
 
20
22
  attr_accessor :currency_code
21
23
 
24
+ attr_accessor :network_token_data
25
+
22
26
  attr_accessor :payment_product_id
23
27
 
24
28
  attr_accessor :scheme_reference_data
@@ -39,6 +43,12 @@ module OnlinePayments
39
43
  self
40
44
  end
41
45
 
46
+ # Sets the property and returns this same instance.
47
+ def with_network_token_data(value)
48
+ @network_token_data = value
49
+ self
50
+ end
51
+
42
52
  # Sets the property and returns this same instance.
43
53
  def with_payment_product_id(value)
44
54
  @payment_product_id = value
@@ -68,6 +78,7 @@ module OnlinePayments
68
78
  hash = super
69
79
  hash['card'] = @card.to_h unless @card.nil?
70
80
  hash['currencyCode'] = @currency_code unless @currency_code.nil?
81
+ hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
71
82
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
72
83
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
73
84
  hash['tokenId'] = @token_id unless @token_id.nil?
@@ -84,6 +95,10 @@ module OnlinePayments
84
95
  if hash.has_key? 'currencyCode'
85
96
  @currency_code = hash['currencyCode']
86
97
  end
98
+ if hash.has_key? 'networkTokenData'
99
+ raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
100
+ @network_token_data = OnlinePayments::SDK::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
101
+ end
87
102
  if hash.has_key? 'paymentProductId'
88
103
  @payment_product_id = hash['paymentProductId']
89
104
  end
@@ -1,6 +1,8 @@
1
1
  #
2
2
  # This file was automatically generated.
3
3
  #
4
+ require 'date'
5
+
4
6
  require 'onlinepayments/sdk/domain/amount_of_money'
5
7
  require 'onlinepayments/sdk/domain/data_object'
6
8
  require 'onlinepayments/sdk/domain/operation_payment_references'
@@ -17,6 +19,7 @@ module OnlinePayments
17
19
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences, nil] references
18
20
  # @attr [String, nil] status
19
21
  # @attr [OnlinePayments::SDK::Domain::PaymentStatusOutput, nil] status_output
22
+ # @attr [DateTime, nil] transaction_date
20
23
  class OperationOutput < OnlinePayments::SDK::Domain::DataObject
21
24
 
22
25
  attr_accessor :amount_of_money
@@ -33,6 +36,8 @@ module OnlinePayments
33
36
 
34
37
  attr_accessor :status_output
35
38
 
39
+ attr_accessor :transaction_date
40
+
36
41
  # Sets the property and returns this same instance.
37
42
  def with_amount_of_money(value)
38
43
  @amount_of_money = value
@@ -75,6 +80,12 @@ module OnlinePayments
75
80
  self
76
81
  end
77
82
 
83
+ # Sets the property and returns this same instance.
84
+ def with_transaction_date(value)
85
+ @transaction_date = value
86
+ self
87
+ end
88
+
78
89
  # @return (Hash)
79
90
  def to_h
80
91
  hash = super
@@ -85,6 +96,7 @@ module OnlinePayments
85
96
  hash['references'] = @references.to_h unless @references.nil?
86
97
  hash['status'] = @status unless @status.nil?
87
98
  hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
99
+ hash['transactionDate'] = @transaction_date.iso8601(3) unless @transaction_date.nil?
88
100
  hash
89
101
  end
90
102
 
@@ -115,6 +127,9 @@ module OnlinePayments
115
127
  raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
116
128
  @status_output = OnlinePayments::SDK::Domain::PaymentStatusOutput.new_from_hash(hash['statusOutput'])
117
129
  end
130
+ if hash.has_key? 'transactionDate'
131
+ @transaction_date = DateTime.parse(hash['transactionDate'])
132
+ end
118
133
  end
119
134
  end
120
135
  end
@@ -0,0 +1,49 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [Integer, nil] page
10
+ # @attr [Integer, nil] page_size
11
+ class Pagination < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :page
14
+
15
+ attr_accessor :page_size
16
+
17
+ # Sets the property and returns this same instance.
18
+ def with_page(value)
19
+ @page = value
20
+ self
21
+ end
22
+
23
+ # Sets the property and returns this same instance.
24
+ def with_page_size(value)
25
+ @page_size = value
26
+ self
27
+ end
28
+
29
+ # @return (Hash)
30
+ def to_h
31
+ hash = super
32
+ hash['page'] = @page unless @page.nil?
33
+ hash['pageSize'] = @page_size unless @page_size.nil?
34
+ hash
35
+ end
36
+
37
+ def from_hash(hash)
38
+ super
39
+ if hash.has_key? 'page'
40
+ @page = hash['page']
41
+ end
42
+ if hash.has_key? 'pageSize'
43
+ @page_size = hash['pageSize']
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,157 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'date'
5
+
6
+ require 'onlinepayments/sdk/domain/amount_of_money'
7
+ require 'onlinepayments/sdk/domain/data_object'
8
+
9
+ module OnlinePayments
10
+ module SDK
11
+ module Domain
12
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney, nil] amount
13
+ # @attr [String, nil] created_by
14
+ # @attr [DateTime, nil] creation_date
15
+ # @attr [DateTime, nil] expiration_date
16
+ # @attr [true/false, nil] is_reusable_link
17
+ # @attr [String, nil] merchant_id
18
+ # @attr [String, nil] merchant_reference
19
+ # @attr [String, nil] payment_link_id
20
+ # @attr [String, nil] redirection_url
21
+ # @attr [String, nil] status
22
+ class PaymentLinkOverviewEntry < OnlinePayments::SDK::Domain::DataObject
23
+
24
+ attr_accessor :amount
25
+
26
+ attr_accessor :created_by
27
+
28
+ attr_accessor :creation_date
29
+
30
+ attr_accessor :expiration_date
31
+
32
+ attr_accessor :is_reusable_link
33
+
34
+ attr_accessor :merchant_id
35
+
36
+ attr_accessor :merchant_reference
37
+
38
+ attr_accessor :payment_link_id
39
+
40
+ attr_accessor :redirection_url
41
+
42
+ attr_accessor :status
43
+
44
+ # Sets the property and returns this same instance.
45
+ def with_amount(value)
46
+ @amount = value
47
+ self
48
+ end
49
+
50
+ # Sets the property and returns this same instance.
51
+ def with_created_by(value)
52
+ @created_by = value
53
+ self
54
+ end
55
+
56
+ # Sets the property and returns this same instance.
57
+ def with_creation_date(value)
58
+ @creation_date = value
59
+ self
60
+ end
61
+
62
+ # Sets the property and returns this same instance.
63
+ def with_expiration_date(value)
64
+ @expiration_date = value
65
+ self
66
+ end
67
+
68
+ # Sets the property and returns this same instance.
69
+ def with_is_reusable_link(value)
70
+ @is_reusable_link = value
71
+ self
72
+ end
73
+
74
+ # Sets the property and returns this same instance.
75
+ def with_merchant_id(value)
76
+ @merchant_id = value
77
+ self
78
+ end
79
+
80
+ # Sets the property and returns this same instance.
81
+ def with_merchant_reference(value)
82
+ @merchant_reference = value
83
+ self
84
+ end
85
+
86
+ # Sets the property and returns this same instance.
87
+ def with_payment_link_id(value)
88
+ @payment_link_id = value
89
+ self
90
+ end
91
+
92
+ # Sets the property and returns this same instance.
93
+ def with_redirection_url(value)
94
+ @redirection_url = value
95
+ self
96
+ end
97
+
98
+ # Sets the property and returns this same instance.
99
+ def with_status(value)
100
+ @status = value
101
+ self
102
+ end
103
+
104
+ # @return (Hash)
105
+ def to_h
106
+ hash = super
107
+ hash['amount'] = @amount.to_h unless @amount.nil?
108
+ hash['createdBy'] = @created_by unless @created_by.nil?
109
+ hash['creationDate'] = @creation_date.iso8601(3) unless @creation_date.nil?
110
+ hash['expirationDate'] = @expiration_date.iso8601(3) unless @expiration_date.nil?
111
+ hash['isReusableLink'] = @is_reusable_link unless @is_reusable_link.nil?
112
+ hash['merchantId'] = @merchant_id unless @merchant_id.nil?
113
+ hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
114
+ hash['paymentLinkId'] = @payment_link_id unless @payment_link_id.nil?
115
+ hash['redirectionUrl'] = @redirection_url unless @redirection_url.nil?
116
+ hash['status'] = @status unless @status.nil?
117
+ hash
118
+ end
119
+
120
+ def from_hash(hash)
121
+ super
122
+ if hash.has_key? 'amount'
123
+ raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
124
+ @amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amount'])
125
+ end
126
+ if hash.has_key? 'createdBy'
127
+ @created_by = hash['createdBy']
128
+ end
129
+ if hash.has_key? 'creationDate'
130
+ @creation_date = DateTime.parse(hash['creationDate'])
131
+ end
132
+ if hash.has_key? 'expirationDate'
133
+ @expiration_date = DateTime.parse(hash['expirationDate'])
134
+ end
135
+ if hash.has_key? 'isReusableLink'
136
+ @is_reusable_link = hash['isReusableLink']
137
+ end
138
+ if hash.has_key? 'merchantId'
139
+ @merchant_id = hash['merchantId']
140
+ end
141
+ if hash.has_key? 'merchantReference'
142
+ @merchant_reference = hash['merchantReference']
143
+ end
144
+ if hash.has_key? 'paymentLinkId'
145
+ @payment_link_id = hash['paymentLinkId']
146
+ end
147
+ if hash.has_key? 'redirectionUrl'
148
+ @redirection_url = hash['redirectionUrl']
149
+ end
150
+ if hash.has_key? 'status'
151
+ @status = hash['status']
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
157
+ end
@@ -0,0 +1,57 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [Array<String>, nil] merchant_ids
10
+ # @attr [Array<String>, nil] status
11
+ class PaymentLinkOverviewFiltering < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :merchant_ids
14
+
15
+ attr_accessor :status
16
+
17
+ # Sets the property and returns this same instance.
18
+ def with_merchant_ids(value)
19
+ @merchant_ids = value
20
+ self
21
+ end
22
+
23
+ # Sets the property and returns this same instance.
24
+ def with_status(value)
25
+ @status = value
26
+ self
27
+ end
28
+
29
+ # @return (Hash)
30
+ def to_h
31
+ hash = super
32
+ hash['merchantIds'] = @merchant_ids unless @merchant_ids.nil?
33
+ hash['status'] = @status unless @status.nil?
34
+ hash
35
+ end
36
+
37
+ def from_hash(hash)
38
+ super
39
+ if hash.has_key? 'merchantIds'
40
+ raise TypeError, "value '%s' is not an Array" % [hash['merchantIds']] unless hash['merchantIds'].is_a? Array
41
+ @merchant_ids = []
42
+ hash['merchantIds'].each do |e|
43
+ @merchant_ids << e
44
+ end
45
+ end
46
+ if hash.has_key? 'status'
47
+ raise TypeError, "value '%s' is not an Array" % [hash['status']] unless hash['status'].is_a? Array
48
+ @status = []
49
+ hash['status'].each do |e|
50
+ @status << e
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end