mollie / mollie-api-ruby

Mollie API client for Ruby
http://www.mollie.com
BSD 2-Clause "Simplified" License
81 stars 42 forks source link

Get Partner for ruby gem #155

Closed lvonk closed 2 years ago

lvonk commented 2 years ago

Hi,

I can't seem to find how to get https://docs.mollie.com/reference/v2/organizations-api/get-partner# Get Partner using this gem. Am I missing something or is it not (yet) implemented?

justincase commented 2 years ago

Hi @lvonk, you're correct. It hasn't been implemented yet.

lvonk commented 2 years ago

Okay thanks. Is this on the roadmap in the foreseeable future?

justincase commented 2 years ago

Definitely! I plan on adding it to v4.11.0 which should be released in the next 3-4 weeks.

justincase commented 2 years ago

@lvonk The API has been added to the partner-api branch. If you have a moment, could you test it and tell me if it meets your requirements? Thanks!

Gemfile

gem 'mollie-api-ruby', github: 'mollie/mollie-api-ruby', branch: 'partner-api'

Usage

partner = Mollie::Partner.current

partner.type # => "signuplink"
partner.commission_partner? # => true
partner.user_agent_tokens[i].token # => "unique-token"
partner.user_agent_tokens[i].starts_at # => 2018-03-20 13:13:37 +0000
partner.user_agent_tokens[i].ends_at # => nil
partner.contract_signed_at # => 2018-03-20 13:13:37 +0000
partner.contract_update_available? # => nil
partner.signuplink # => "https://www.mollie.com/dashboard/signup/myCode?lang=en"
justincase commented 2 years ago

Released as v4.11.0