mx-platform-ruby 0.9.2 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -15
- data/README.md +7 -7
- data/docs/MxPlatformApi.md +309 -90
- data/docs/PaymentAccountResponse.md +30 -0
- data/docs/PaymentAccountResponseBody.md +18 -0
- data/docs/PaymentProcessorAuthorizationCodeRequest.md +22 -0
- data/docs/PaymentProcessorAuthorizationCodeRequestBody.md +18 -0
- data/docs/PaymentProcessorAuthorizationCodeResponse.md +18 -0
- data/docs/PaymentProcessorAuthorizationCodeResponseBody.md +18 -0
- data/docs/PaymentProcessorTokenResponseBody.md +22 -0
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +347 -131
- data/lib/mx-platform-ruby/configuration.rb +7 -0
- data/lib/mx-platform-ruby/models/payment_account_response.rb +279 -0
- data/lib/mx-platform-ruby/models/payment_account_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +236 -0
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +218 -0
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +219 -0
- data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +218 -0
- data/lib/mx-platform-ruby/models/payment_processor_token_response_body.rb +239 -0
- data/lib/mx-platform-ruby/version.rb +1 -1
- data/lib/mx-platform-ruby.rb +7 -0
- data/openapi/config.yml +1 -1
- data/openapi/templates/README.mustache +7 -7
- data/spec/api/mx_platform_api_spec.rb +55 -15
- data/spec/models/payment_account_response_body_spec.rb +34 -0
- data/spec/models/payment_account_response_spec.rb +70 -0
- data/spec/models/payment_processor_authorization_code_request_body_spec.rb +34 -0
- data/spec/models/payment_processor_authorization_code_request_spec.rb +46 -0
- data/spec/models/payment_processor_authorization_code_response_body_spec.rb +34 -0
- data/spec/models/payment_processor_authorization_code_response_spec.rb +34 -0
- data/spec/models/payment_processor_token_response_body_spec.rb +46 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9b7bf8cec23929cbf30de63f0882a276aaf37635577cb805acd1bd9afc9110d
|
4
|
+
data.tar.gz: 3bdab1f7207bb87e83d8ad6d709b964d2f0d26ea1e4282b61beae2e5301627a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a23569dc78294f1114f252c26b1dd703731bbb14db753e190352c8a871d9432cff4641ad8579d272bc0ea1379022ea4d80bd328d03deaaa5f2f936d0363efd4
|
7
|
+
data.tar.gz: 4f17b42abd95b66f216a06a40600d9334b90d9d9c66d13a4e0de5120389af09a2cd06c1fe5c6f71f80d280491985949f9ba99cb79ee176676fdd620d1de37e5a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mx-platform-ruby (0.
|
4
|
+
mx-platform-ruby (0.11.0)
|
5
5
|
faraday (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
byebug (11.1.3)
|
12
12
|
coderay (1.1.3)
|
13
13
|
diff-lcs (1.5.0)
|
14
|
-
faraday (1.
|
14
|
+
faraday (1.10.0)
|
15
15
|
faraday-em_http (~> 1.0)
|
16
16
|
faraday-em_synchrony (~> 1.0)
|
17
17
|
faraday-excon (~> 1.1)
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
method_source (1.0.0)
|
39
39
|
multipart-post (2.1.1)
|
40
40
|
parallel (1.21.0)
|
41
|
-
parser (3.1.
|
41
|
+
parser (3.1.1.0)
|
42
42
|
ast (~> 2.4.1)
|
43
43
|
pry (0.13.1)
|
44
44
|
coderay (~> 1.1)
|
@@ -50,19 +50,19 @@ GEM
|
|
50
50
|
stringio
|
51
51
|
rainbow (3.1.1)
|
52
52
|
rake (13.0.6)
|
53
|
-
rspec (3.
|
54
|
-
rspec-core (~> 3.
|
55
|
-
rspec-expectations (~> 3.
|
56
|
-
rspec-mocks (~> 3.
|
57
|
-
rspec-core (3.
|
58
|
-
rspec-support (~> 3.
|
59
|
-
rspec-expectations (3.
|
53
|
+
rspec (3.11.0)
|
54
|
+
rspec-core (~> 3.11.0)
|
55
|
+
rspec-expectations (~> 3.11.0)
|
56
|
+
rspec-mocks (~> 3.11.0)
|
57
|
+
rspec-core (3.11.0)
|
58
|
+
rspec-support (~> 3.11.0)
|
59
|
+
rspec-expectations (3.11.0)
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
-
rspec-support (~> 3.
|
62
|
-
rspec-mocks (3.
|
61
|
+
rspec-support (~> 3.11.0)
|
62
|
+
rspec-mocks (3.11.0)
|
63
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
-
rspec-support (~> 3.
|
65
|
-
rspec-support (3.
|
64
|
+
rspec-support (~> 3.11.0)
|
65
|
+
rspec-support (3.11.0)
|
66
66
|
rubocop (0.66.0)
|
67
67
|
jaro_winkler (~> 1.5.1)
|
68
68
|
parallel (~> 1.10)
|
@@ -87,4 +87,4 @@ DEPENDENCIES
|
|
87
87
|
rubocop (~> 0.66.0)
|
88
88
|
|
89
89
|
BUNDLED WITH
|
90
|
-
2.3.
|
90
|
+
2.3.8
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
|
|
38
38
|
```ruby
|
39
39
|
require 'mx-platform-ruby'
|
40
40
|
|
41
|
-
MxPlatformRuby.configure do |config|
|
41
|
+
::MxPlatformRuby.configure do |config|
|
42
42
|
# Configure with your Client ID/API Key from https://dashboard.mx.com
|
43
43
|
config.username = 'Your Client ID'
|
44
44
|
config.password = 'Your API Key'
|
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
|
|
51
51
|
api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
|
52
52
|
mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
|
53
53
|
|
54
|
-
|
55
|
-
user: MxPlatformRuby::UserCreateRequest.new(
|
56
|
-
metadata:
|
54
|
+
request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
|
55
|
+
user: ::MxPlatformRuby::UserCreateRequest.new(
|
56
|
+
metadata: 'Creating a user!'
|
57
57
|
)
|
58
58
|
)
|
59
59
|
|
60
60
|
begin
|
61
|
-
|
62
|
-
p
|
63
|
-
rescue MxPlatformRuby::ApiError => e
|
61
|
+
response = mx_platform_api.create_user(request_body)
|
62
|
+
p response
|
63
|
+
rescue ::MxPlatformRuby::ApiError => e
|
64
64
|
puts "Error when calling MxPlatformApi->create_user: #{e}"
|
65
65
|
end
|
66
66
|
```
|