Class List Method List File List

# Class: VertxAuthOauth2::MailchimpAuth

Inherits:
  Object
  - Object
  - VertxAuthOauth2::MailchimpAuth
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb

## Overview

Simplified factory to create an for Mailchimp.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxAuthOauth2::OAuth2Auth) create(vertx = nil, clientId = nil, clientSecret = nil, httpClientOptions = nil)
  Create a OAuth2Auth provider for Mailchimp.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    19
    20
    21
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 19

    def @@j_api_type.accept?(obj)
      obj.class == MailchimpAuth
    end

### + (`::VertxAuthOauth2::OAuth2Auth`) create(vertx = nil, clientId = nil, clientSecret = nil, httpClientOptions = nil)

Create a OAuth2Auth provider for Mailchimp

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`)
- clientId (`String`) (defaults to: `nil`) —
  the client id given to you by Mailchimp
- clientSecret (`String`) (defaults to: `nil`) —
  the client secret given to you by Mailchimp
- httpClientOptions (`Hash`) (defaults to: `nil`) —
  custom http client options

Returns:

- (`::VertxAuthOauth2::OAuth2Auth`)

Raises:

- (`ArgumentError`)

    40
    41
    42
    43
    44
    45
    46
    47
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 40

    def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
      if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
      elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
    end

### + (`Object`) j_api_type

    28
    29
    30
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 28

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    31
    32
    33
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 31

    def self.j_class
      Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_class
    end

### + (`Object`) unwrap(obj)

    25
    26
    27
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 25

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

    22
    23
    24
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/mailchimp_auth.rb', line 22

    def @@j_api_type.wrap(obj)
      MailchimpAuth.new(obj)
    end