splitit-apimatic-sdk 1.0.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 (87) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +154 -0
  4. data/bin/console +15 -0
  5. data/lib/splitit_web_api_v4/api_helper.rb +10 -0
  6. data/lib/splitit_web_api_v4/client.rb +83 -0
  7. data/lib/splitit_web_api_v4/configuration.rb +188 -0
  8. data/lib/splitit_web_api_v4/controllers/base_controller.rb +60 -0
  9. data/lib/splitit_web_api_v4/controllers/installment_plan_controller.rb +242 -0
  10. data/lib/splitit_web_api_v4/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/splitit_web_api_v4/exceptions/api_error_response_exception.rb +51 -0
  12. data/lib/splitit_web_api_v4/exceptions/api_exception.rb +21 -0
  13. data/lib/splitit_web_api_v4/exceptions/o_auth_provider_exception.rb +64 -0
  14. data/lib/splitit_web_api_v4/http/auth/api_key.rb +52 -0
  15. data/lib/splitit_web_api_v4/http/auth/o_auth2.rb +156 -0
  16. data/lib/splitit_web_api_v4/http/http_call_back.rb +10 -0
  17. data/lib/splitit_web_api_v4/http/http_method_enum.rb +10 -0
  18. data/lib/splitit_web_api_v4/http/http_request.rb +10 -0
  19. data/lib/splitit_web_api_v4/http/http_response.rb +10 -0
  20. data/lib/splitit_web_api_v4/http/proxy_settings.rb +22 -0
  21. data/lib/splitit_web_api_v4/models/amount_data.rb +70 -0
  22. data/lib/splitit_web_api_v4/models/api_error_model.rb +93 -0
  23. data/lib/splitit_web_api_v4/models/apr_data.rb +70 -0
  24. data/lib/splitit_web_api_v4/models/authorization_status_enum.rb +40 -0
  25. data/lib/splitit_web_api_v4/models/authorize_authorization_data.rb +154 -0
  26. data/lib/splitit_web_api_v4/models/authorize_request.rb +115 -0
  27. data/lib/splitit_web_api_v4/models/authorize_response.rb +221 -0
  28. data/lib/splitit_web_api_v4/models/base_model.rb +110 -0
  29. data/lib/splitit_web_api_v4/models/billing_address_data.rb +111 -0
  30. data/lib/splitit_web_api_v4/models/card_details.rb +108 -0
  31. data/lib/splitit_web_api_v4/models/card_validity_request.rb +62 -0
  32. data/lib/splitit_web_api_v4/models/card_validity_response.rb +80 -0
  33. data/lib/splitit_web_api_v4/models/checkout_url_data.rb +80 -0
  34. data/lib/splitit_web_api_v4/models/content_segment.rb +90 -0
  35. data/lib/splitit_web_api_v4/models/external_provider_types_enum.rb +48 -0
  36. data/lib/splitit_web_api_v4/models/inline_content.rb +71 -0
  37. data/lib/splitit_web_api_v4/models/installment_item.rb +101 -0
  38. data/lib/splitit_web_api_v4/models/installment_plan_details_response.rb +280 -0
  39. data/lib/splitit_web_api_v4/models/installment_plan_search_details_response.rb +71 -0
  40. data/lib/splitit_web_api_v4/models/installment_plan_search_request.rb +79 -0
  41. data/lib/splitit_web_api_v4/models/installment_plan_status_enum.rb +72 -0
  42. data/lib/splitit_web_api_v4/models/installment_status_enum.rb +60 -0
  43. data/lib/splitit_web_api_v4/models/masked_card_details.rb +82 -0
  44. data/lib/splitit_web_api_v4/models/metadata_item.rb +71 -0
  45. data/lib/splitit_web_api_v4/models/o_auth_provider_error_enum.rb +62 -0
  46. data/lib/splitit_web_api_v4/models/o_auth_scope_o_auth2_enum.rb +26 -0
  47. data/lib/splitit_web_api_v4/models/o_auth_token.rb +96 -0
  48. data/lib/splitit_web_api_v4/models/offer_item.rb +164 -0
  49. data/lib/splitit_web_api_v4/models/offers_billing_address.rb +108 -0
  50. data/lib/splitit_web_api_v4/models/offers_card_details.rb +108 -0
  51. data/lib/splitit_web_api_v4/models/offers_merchant_details.rb +82 -0
  52. data/lib/splitit_web_api_v4/models/offers_payment_method.rb +66 -0
  53. data/lib/splitit_web_api_v4/models/offers_payment_method_response.rb +88 -0
  54. data/lib/splitit_web_api_v4/models/offers_request.rb +145 -0
  55. data/lib/splitit_web_api_v4/models/offers_response.rb +156 -0
  56. data/lib/splitit_web_api_v4/models/offers_shopper_details.rb +112 -0
  57. data/lib/splitit_web_api_v4/models/offers_store_location.rb +108 -0
  58. data/lib/splitit_web_api_v4/models/payment_link_request.rb +195 -0
  59. data/lib/splitit_web_api_v4/models/payment_link_response.rb +107 -0
  60. data/lib/splitit_web_api_v4/models/payment_method.rb +66 -0
  61. data/lib/splitit_web_api_v4/models/payment_method_data.rb +78 -0
  62. data/lib/splitit_web_api_v4/models/payment_method_type_enum.rb +26 -0
  63. data/lib/splitit_web_api_v4/models/pis_error_codes_enum.rb +1021 -0
  64. data/lib/splitit_web_api_v4/models/plan_authorization_data.rb +172 -0
  65. data/lib/splitit_web_api_v4/models/plan_links_data.rb +91 -0
  66. data/lib/splitit_web_api_v4/models/plan_status_enum.rb +48 -0
  67. data/lib/splitit_web_api_v4/models/processing_data.rb +63 -0
  68. data/lib/splitit_web_api_v4/models/purchase_method_enum.rb +52 -0
  69. data/lib/splitit_web_api_v4/models/redirect_urls.rb +81 -0
  70. data/lib/splitit_web_api_v4/models/refund_item.rb +136 -0
  71. data/lib/splitit_web_api_v4/models/refund_request.rb +70 -0
  72. data/lib/splitit_web_api_v4/models/refund_response.rb +105 -0
  73. data/lib/splitit_web_api_v4/models/shipping_status_enum.rb +40 -0
  74. data/lib/splitit_web_api_v4/models/shopper_details_data.rb +113 -0
  75. data/lib/splitit_web_api_v4/models/three_ds_authentication_data.rb +90 -0
  76. data/lib/splitit_web_api_v4/models/three_ds_execute.rb +62 -0
  77. data/lib/splitit_web_api_v4/models/three_ds_redirect_data.rb +93 -0
  78. data/lib/splitit_web_api_v4/models/three_ds_request_data.rb +84 -0
  79. data/lib/splitit_web_api_v4/models/update_offers_payment_method.rb +66 -0
  80. data/lib/splitit_web_api_v4/models/update_offers_request.rb +105 -0
  81. data/lib/splitit_web_api_v4/models/update_order_request.rb +104 -0
  82. data/lib/splitit_web_api_v4/models/update_order_response.rb +126 -0
  83. data/lib/splitit_web_api_v4/models/validation_error.rb +71 -0
  84. data/lib/splitit_web_api_v4/utilities/date_time_helper.rb +11 -0
  85. data/lib/splitit_web_api_v4/utilities/file_wrapper.rb +28 -0
  86. data/lib/splitit_web_api_v4.rb +108 -0
  87. metadata +170 -0
@@ -0,0 +1,164 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OfferItem Model.
8
+ class OfferItem < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :offer_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [AprData]
18
+ attr_accessor :apr
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :currency
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Float]
26
+ attr_accessor :total_amount
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Float]
30
+ attr_accessor :total_fees
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :number_of_installments
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :frequency
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [Float]
42
+ attr_accessor :installment_amount
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [Float]
46
+ attr_accessor :first_installment_amount
47
+
48
+ # TODO: Write general description for this method
49
+ # @return [AmountData]
50
+ attr_accessor :last_installment_amount
51
+
52
+ # TODO: Write general description for this method
53
+ # @return [InlineContent]
54
+ attr_accessor :inline_content
55
+
56
+ # A mapping from model property names to API property names.
57
+ def self.names
58
+ @_hash = {} if @_hash.nil?
59
+ @_hash['offer_id'] = 'OfferId'
60
+ @_hash['apr'] = 'Apr'
61
+ @_hash['currency'] = 'Currency'
62
+ @_hash['total_amount'] = 'TotalAmount'
63
+ @_hash['total_fees'] = 'TotalFees'
64
+ @_hash['number_of_installments'] = 'NumberOfInstallments'
65
+ @_hash['frequency'] = 'Frequency'
66
+ @_hash['installment_amount'] = 'InstallmentAmount'
67
+ @_hash['first_installment_amount'] = 'FirstInstallmentAmount'
68
+ @_hash['last_installment_amount'] = 'LastInstallmentAmount'
69
+ @_hash['inline_content'] = 'InlineContent'
70
+ @_hash
71
+ end
72
+
73
+ # An array for optional fields
74
+ def self.optionals
75
+ %w[
76
+ offer_id
77
+ apr
78
+ currency
79
+ frequency
80
+ last_installment_amount
81
+ inline_content
82
+ ]
83
+ end
84
+
85
+ # An array for nullable fields
86
+ def self.nullables
87
+ []
88
+ end
89
+
90
+ def initialize(total_amount = nil, total_fees = nil,
91
+ number_of_installments = nil, installment_amount = nil,
92
+ first_installment_amount = nil, offer_id = SKIP, apr = SKIP,
93
+ currency = SKIP, frequency = SKIP,
94
+ last_installment_amount = SKIP, inline_content = SKIP)
95
+ @offer_id = offer_id unless offer_id == SKIP
96
+ @apr = apr unless apr == SKIP
97
+ @currency = currency unless currency == SKIP
98
+ @total_amount = total_amount
99
+ @total_fees = total_fees
100
+ @number_of_installments = number_of_installments
101
+ @frequency = frequency unless frequency == SKIP
102
+ @installment_amount = installment_amount
103
+ @first_installment_amount = first_installment_amount
104
+ @last_installment_amount = last_installment_amount unless last_installment_amount == SKIP
105
+ @inline_content = inline_content unless inline_content == SKIP
106
+ end
107
+
108
+ # Creates an instance of the object from a hash.
109
+ def self.from_hash(hash)
110
+ return nil unless hash
111
+
112
+ # Extract variables from the hash.
113
+ total_amount = hash.key?('TotalAmount') ? hash['TotalAmount'] : nil
114
+ total_fees = hash.key?('TotalFees') ? hash['TotalFees'] : nil
115
+ number_of_installments =
116
+ hash.key?('NumberOfInstallments') ? hash['NumberOfInstallments'] : nil
117
+ installment_amount =
118
+ hash.key?('InstallmentAmount') ? hash['InstallmentAmount'] : nil
119
+ first_installment_amount =
120
+ hash.key?('FirstInstallmentAmount') ? hash['FirstInstallmentAmount'] : nil
121
+ offer_id = hash.key?('OfferId') ? hash['OfferId'] : SKIP
122
+ apr = AprData.from_hash(hash['Apr']) if hash['Apr']
123
+ currency = hash.key?('Currency') ? hash['Currency'] : SKIP
124
+ frequency = hash.key?('Frequency') ? hash['Frequency'] : SKIP
125
+ last_installment_amount = AmountData.from_hash(hash['LastInstallmentAmount']) if
126
+ hash['LastInstallmentAmount']
127
+ inline_content = InlineContent.from_hash(hash['InlineContent']) if hash['InlineContent']
128
+
129
+ # Create object from extracted values.
130
+ OfferItem.new(total_amount,
131
+ total_fees,
132
+ number_of_installments,
133
+ installment_amount,
134
+ first_installment_amount,
135
+ offer_id,
136
+ apr,
137
+ currency,
138
+ frequency,
139
+ last_installment_amount,
140
+ inline_content)
141
+ end
142
+
143
+ # Provides a human-readable string representation of the object.
144
+ def to_s
145
+ class_name = self.class.name.split('::').last
146
+ "<#{class_name} offer_id: #{@offer_id}, apr: #{@apr}, currency: #{@currency}, total_amount:"\
147
+ " #{@total_amount}, total_fees: #{@total_fees}, number_of_installments:"\
148
+ " #{@number_of_installments}, frequency: #{@frequency}, installment_amount:"\
149
+ " #{@installment_amount}, first_installment_amount: #{@first_installment_amount},"\
150
+ " last_installment_amount: #{@last_installment_amount}, inline_content: #{@inline_content}>"
151
+ end
152
+
153
+ # Provides a debugging-friendly string with detailed object information.
154
+ def inspect
155
+ class_name = self.class.name.split('::').last
156
+ "<#{class_name} offer_id: #{@offer_id.inspect}, apr: #{@apr.inspect}, currency:"\
157
+ " #{@currency.inspect}, total_amount: #{@total_amount.inspect}, total_fees:"\
158
+ " #{@total_fees.inspect}, number_of_installments: #{@number_of_installments.inspect},"\
159
+ " frequency: #{@frequency.inspect}, installment_amount: #{@installment_amount.inspect},"\
160
+ " first_installment_amount: #{@first_installment_amount.inspect}, last_installment_amount:"\
161
+ " #{@last_installment_amount.inspect}, inline_content: #{@inline_content.inspect}>"
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,108 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OffersBillingAddress Model.
8
+ class OffersBillingAddress < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :line1
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :line2
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :city
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :state
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :postal_code
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :country
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['line1'] = 'Line1'
40
+ @_hash['line2'] = 'Line2'
41
+ @_hash['city'] = 'City'
42
+ @_hash['state'] = 'State'
43
+ @_hash['postal_code'] = 'PostalCode'
44
+ @_hash['country'] = 'Country'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ line2
52
+ city
53
+ state
54
+ ]
55
+ end
56
+
57
+ # An array for nullable fields
58
+ def self.nullables
59
+ []
60
+ end
61
+
62
+ def initialize(line1 = nil, postal_code = nil, country = nil, line2 = SKIP,
63
+ city = SKIP, state = SKIP)
64
+ @line1 = line1
65
+ @line2 = line2 unless line2 == SKIP
66
+ @city = city unless city == SKIP
67
+ @state = state unless state == SKIP
68
+ @postal_code = postal_code
69
+ @country = country
70
+ end
71
+
72
+ # Creates an instance of the object from a hash.
73
+ def self.from_hash(hash)
74
+ return nil unless hash
75
+
76
+ # Extract variables from the hash.
77
+ line1 = hash.key?('Line1') ? hash['Line1'] : nil
78
+ postal_code = hash.key?('PostalCode') ? hash['PostalCode'] : nil
79
+ country = hash.key?('Country') ? hash['Country'] : nil
80
+ line2 = hash.key?('Line2') ? hash['Line2'] : SKIP
81
+ city = hash.key?('City') ? hash['City'] : SKIP
82
+ state = hash.key?('State') ? hash['State'] : SKIP
83
+
84
+ # Create object from extracted values.
85
+ OffersBillingAddress.new(line1,
86
+ postal_code,
87
+ country,
88
+ line2,
89
+ city,
90
+ state)
91
+ end
92
+
93
+ # Provides a human-readable string representation of the object.
94
+ def to_s
95
+ class_name = self.class.name.split('::').last
96
+ "<#{class_name} line1: #{@line1}, line2: #{@line2}, city: #{@city}, state: #{@state},"\
97
+ " postal_code: #{@postal_code}, country: #{@country}>"
98
+ end
99
+
100
+ # Provides a debugging-friendly string with detailed object information.
101
+ def inspect
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} line1: #{@line1.inspect}, line2: #{@line2.inspect}, city: #{@city.inspect},"\
104
+ " state: #{@state.inspect}, postal_code: #{@postal_code.inspect}, country:"\
105
+ " #{@country.inspect}>"
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,108 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OffersCardDetails Model.
8
+ class OffersCardDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :first_name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :last_name
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :card_number
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :exp_month
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Integer]
30
+ attr_accessor :exp_year
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :cvv
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['first_name'] = 'FirstName'
40
+ @_hash['last_name'] = 'LastName'
41
+ @_hash['card_number'] = 'CardNumber'
42
+ @_hash['exp_month'] = 'ExpMonth'
43
+ @_hash['exp_year'] = 'ExpYear'
44
+ @_hash['cvv'] = 'Cvv'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ first_name
52
+ last_name
53
+ cvv
54
+ ]
55
+ end
56
+
57
+ # An array for nullable fields
58
+ def self.nullables
59
+ []
60
+ end
61
+
62
+ def initialize(card_number = nil, exp_month = nil, exp_year = nil,
63
+ first_name = SKIP, last_name = SKIP, cvv = SKIP)
64
+ @first_name = first_name unless first_name == SKIP
65
+ @last_name = last_name unless last_name == SKIP
66
+ @card_number = card_number
67
+ @exp_month = exp_month
68
+ @exp_year = exp_year
69
+ @cvv = cvv unless cvv == SKIP
70
+ end
71
+
72
+ # Creates an instance of the object from a hash.
73
+ def self.from_hash(hash)
74
+ return nil unless hash
75
+
76
+ # Extract variables from the hash.
77
+ card_number = hash.key?('CardNumber') ? hash['CardNumber'] : nil
78
+ exp_month = hash.key?('ExpMonth') ? hash['ExpMonth'] : nil
79
+ exp_year = hash.key?('ExpYear') ? hash['ExpYear'] : nil
80
+ first_name = hash.key?('FirstName') ? hash['FirstName'] : SKIP
81
+ last_name = hash.key?('LastName') ? hash['LastName'] : SKIP
82
+ cvv = hash.key?('Cvv') ? hash['Cvv'] : SKIP
83
+
84
+ # Create object from extracted values.
85
+ OffersCardDetails.new(card_number,
86
+ exp_month,
87
+ exp_year,
88
+ first_name,
89
+ last_name,
90
+ cvv)
91
+ end
92
+
93
+ # Provides a human-readable string representation of the object.
94
+ def to_s
95
+ class_name = self.class.name.split('::').last
96
+ "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, card_number:"\
97
+ " #{@card_number}, exp_month: #{@exp_month}, exp_year: #{@exp_year}, cvv: #{@cvv}>"
98
+ end
99
+
100
+ # Provides a debugging-friendly string with detailed object information.
101
+ def inspect
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
104
+ " card_number: #{@card_number.inspect}, exp_month: #{@exp_month.inspect}, exp_year:"\
105
+ " #{@exp_year.inspect}, cvv: #{@cvv.inspect}>"
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,82 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OffersMerchantDetails Model.
8
+ class OffersMerchantDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :store_name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :store_id
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [OffersStoreLocation]
22
+ attr_accessor :store_location
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['store_name'] = 'StoreName'
28
+ @_hash['store_id'] = 'StoreId'
29
+ @_hash['store_location'] = 'StoreLocation'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ store_name
37
+ store_id
38
+ ]
39
+ end
40
+
41
+ # An array for nullable fields
42
+ def self.nullables
43
+ []
44
+ end
45
+
46
+ def initialize(store_location = nil, store_name = SKIP, store_id = SKIP)
47
+ @store_name = store_name unless store_name == SKIP
48
+ @store_id = store_id unless store_id == SKIP
49
+ @store_location = store_location
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ store_location = OffersStoreLocation.from_hash(hash['StoreLocation']) if
58
+ hash['StoreLocation']
59
+ store_name = hash.key?('StoreName') ? hash['StoreName'] : SKIP
60
+ store_id = hash.key?('StoreId') ? hash['StoreId'] : SKIP
61
+
62
+ # Create object from extracted values.
63
+ OffersMerchantDetails.new(store_location,
64
+ store_name,
65
+ store_id)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} store_name: #{@store_name}, store_id: #{@store_id}, store_location:"\
72
+ " #{@store_location}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} store_name: #{@store_name.inspect}, store_id: #{@store_id.inspect},"\
79
+ " store_location: #{@store_location.inspect}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,66 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OffersPaymentMethod Model.
8
+ class OffersPaymentMethod < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [OffersCardDetails]
18
+ attr_accessor :card_details
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'Type'
24
+ @_hash['card_details'] = 'CardDetails'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(card_details = nil)
39
+ @type = 'Card'
40
+ @card_details = card_details
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ card_details = OffersCardDetails.from_hash(hash['CardDetails']) if hash['CardDetails']
49
+
50
+ # Create object from extracted values.
51
+ OffersPaymentMethod.new(card_details)
52
+ end
53
+
54
+ # Provides a human-readable string representation of the object.
55
+ def to_s
56
+ class_name = self.class.name.split('::').last
57
+ "<#{class_name} type: #{@type}, card_details: #{@card_details}>"
58
+ end
59
+
60
+ # Provides a debugging-friendly string with detailed object information.
61
+ def inspect
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} type: #{@type.inspect}, card_details: #{@card_details.inspect}>"
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,88 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # OffersPaymentMethodResponse Model.
8
+ class OffersPaymentMethodResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :last4_digits
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :bin
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :issuer_name
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_reader :type
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['last4_digits'] = 'Last4Digits'
32
+ @_hash['bin'] = 'BIN'
33
+ @_hash['issuer_name'] = 'IssuerName'
34
+ @_hash['type'] = 'Type'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ last4_digits
42
+ bin
43
+ issuer_name
44
+ ]
45
+ end
46
+
47
+ # An array for nullable fields
48
+ def self.nullables
49
+ []
50
+ end
51
+
52
+ def initialize(last4_digits = SKIP, bin = SKIP, issuer_name = SKIP)
53
+ @last4_digits = last4_digits unless last4_digits == SKIP
54
+ @bin = bin unless bin == SKIP
55
+ @issuer_name = issuer_name unless issuer_name == SKIP
56
+ @type = 'Card'
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ last4_digits = hash.key?('Last4Digits') ? hash['Last4Digits'] : SKIP
65
+ bin = hash.key?('BIN') ? hash['BIN'] : SKIP
66
+ issuer_name = hash.key?('IssuerName') ? hash['IssuerName'] : SKIP
67
+
68
+ # Create object from extracted values.
69
+ OffersPaymentMethodResponse.new(last4_digits,
70
+ bin,
71
+ issuer_name)
72
+ end
73
+
74
+ # Provides a human-readable string representation of the object.
75
+ def to_s
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} last4_digits: #{@last4_digits}, bin: #{@bin}, issuer_name: #{@issuer_name},"\
78
+ " type: #{@type}>"
79
+ end
80
+
81
+ # Provides a debugging-friendly string with detailed object information.
82
+ def inspect
83
+ class_name = self.class.name.split('::').last
84
+ "<#{class_name} last4_digits: #{@last4_digits.inspect}, bin: #{@bin.inspect}, issuer_name:"\
85
+ " #{@issuer_name.inspect}, type: #{@type.inspect}>"
86
+ end
87
+ end
88
+ end