Skip to content

Commit a39ca4e

Browse files
Merge pull request #61 from mxenabled/bm/add_scope
Standardize readme example
2 parents faf78a8 + c53a036 commit a39ca4e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

openapi/templates/README.mustache

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
3838
```ruby
3939
require 'mx-platform-ruby'
4040

41-
MxPlatformRuby.configure do |config|
41+
::MxPlatformRuby.configure do |config|
4242
# Configure with your Client ID/API Key from https://dashboard.mx.com
4343
config.username = 'Your Client ID'
4444
config.password = 'Your API Key'
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
5151
api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
5252
mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
5353

54-
user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
55-
user: MxPlatformRuby::UserCreateRequest.new(
56-
metadata: "Creating a user!"
54+
request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
55+
user: ::MxPlatformRuby::UserCreateRequest.new(
56+
metadata: 'Creating a user!'
5757
)
5858
)
5959

6060
begin
61-
result = mx_platform_api.create_user(user_create_request_body)
62-
p result
63-
rescue MxPlatformRuby::ApiError => e
61+
response = mx_platform_api.create_user(request_body)
62+
p response
63+
rescue ::MxPlatformRuby::ApiError => e
6464
puts "Error when calling MxPlatformApi->create_user: #{e}"
6565
end
6666
```

0 commit comments

Comments
 (0)