Tabnine Logo
PaymentMethodPlugin.isDefaultPaymentMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
isDefaultPaymentMethod
method
in
org.killbill.billing.payment.api.PaymentMethodPlugin

Best Java code snippets using org.killbill.billing.payment.api.PaymentMethodPlugin.isDefaultPaymentMethod (Showing top 5 results out of 315)

origin: org.kill-bill.billing/killbill-payment

public TestPaymentMethodPlugin(final UUID kbPaymentMethodId, final PaymentMethodPlugin src, final String externalPaymentId) {
  this.kbPaymentMethodId = kbPaymentMethodId;
  this.externalPaymentMethodId = externalPaymentId;
  this.isDefaultPaymentMethod = src.isDefaultPaymentMethod();
  this.properties = src.getProperties();
}
origin: org.kill-bill.billing/killbill-jaxrs

public static PaymentMethodJson toPaymentMethodJson(final Account account, final PaymentMethod in, @Nullable final AccountAuditLogs accountAuditLogs) {
  final boolean isDefault = account.getPaymentMethodId() != null && account.getPaymentMethodId().equals(in.getId());
  final PaymentMethodPlugin pluginDetail = in.getPluginDetail();
  PaymentMethodPluginDetailJson pluginDetailJson = null;
  if (pluginDetail != null) {
    List<PluginPropertyJson> properties = null;
    if (pluginDetail.getProperties() != null) {
      properties = new ArrayList<PluginPropertyJson>(Collections2.transform(pluginDetail.getProperties(), new Function<PluginProperty, PluginPropertyJson>() {
        @Override
        public PluginPropertyJson apply(final PluginProperty input) {
          return new PluginPropertyJson(input.getKey(), input.getValue() == null ? null : input.getValue().toString(), input.getIsUpdatable());
        }
      }));
    }
    pluginDetailJson = new PaymentMethodPluginDetailJson(pluginDetail.getExternalPaymentMethodId(),
                               pluginDetail.isDefaultPaymentMethod(),
                               properties);
  }
  return new PaymentMethodJson(in.getId(), in.getExternalKey(), account.getId(), isDefault, in.getPluginName(),
                 pluginDetailJson, toAuditLogJson(accountAuditLogs == null ? null : accountAuditLogs.getAuditLogsForPaymentMethod(in.getId())));
}
origin: org.kill-bill.billing.plugin.java/killbill-base-plugin

Assert.assertEquals(plugin.getKbPaymentMethodId(), kbPaymentMethodId, "Wrong kbPaymentMethodId");
Assert.assertEquals(plugin.getExternalPaymentMethodId(), "myToken", "Wrong externalPaymentMethodId");
Assert.assertEquals(plugin.isDefaultPaymentMethod(), true, "Wrong defaultPaymentMethod");
Assert.assertNotNull(plugin.getProperties(), "Wrong properties");
origin: org.kill-bill.billing.plugin.java/killbill-base-plugin

Assert.assertEquals(plugin.getKbPaymentMethodId(), kbPaymentMethodId, "Wrong kbPaymentMethodId");
Assert.assertEquals(plugin.getExternalPaymentMethodId(), null, "Wrong externalPaymentMethodId");
Assert.assertEquals(plugin.isDefaultPaymentMethod(), true, "Wrong defaultPaymentMethod");
Assert.assertNotNull(plugin.getProperties(), "Wrong properties");
Assert.assertEquals(plugin.getProperties().size(), 0, "Wrong properties size");
origin: org.kill-bill.billing/killbill-payment

public UUID addTestPaymentMethod(final String pluginName, final Account account, final PaymentMethodPlugin paymentMethodInfo, final Iterable<PluginProperty> pluginProperties) throws Exception {
  final boolean setDefault = paymentMethodInfo.isDefaultPaymentMethod();
  final UUID paymentMethodId = paymentApi.addPaymentMethod(account, paymentMethodInfo.getExternalPaymentMethodId(), pluginName, setDefault, paymentMethodInfo, pluginProperties, context);
  if (isFastTest() && setDefault) {
    final Account account1 = new MockAccountBuilder(account).paymentMethodId(paymentMethodId).build();
    accountApi.updateAccount(account1, context);
  }
  return paymentMethodId;
}
org.killbill.billing.payment.apiPaymentMethodPluginisDefaultPaymentMethod

Popular methods of PaymentMethodPlugin

  • getProperties
  • getExternalPaymentMethodId
  • getKbPaymentMethodId

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now