• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-java / #16599

29 Oct 2024 11:04PM UTC coverage: 12.519% (-0.1%) from 12.62%
#16599

push

github

web-flow
Merge pull request #1914 from stripe/latest-codegen-beta

Update generated code for beta

40 of 1580 new or added lines in 51 files covered. (2.53%)

19 existing lines in 15 files now uncovered.

18843 of 150513 relevant lines covered (12.52%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/stripe/service/v2/core/EventDestinationService.java
1
// File generated from our OpenAPI spec
2
package com.stripe.service.v2.core;
3

4
import com.google.gson.reflect.TypeToken;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.v2.Event;
7
import com.stripe.model.v2.EventDestination;
8
import com.stripe.model.v2.StripeCollection;
9
import com.stripe.net.ApiRequest;
10
import com.stripe.net.ApiRequestParams;
11
import com.stripe.net.ApiResource;
12
import com.stripe.net.ApiService;
13
import com.stripe.net.BaseAddress;
14
import com.stripe.net.RequestOptions;
15
import com.stripe.net.StripeResponseGetter;
16
import com.stripe.param.v2.core.EventDestinationCreateParams;
17
import com.stripe.param.v2.core.EventDestinationListParams;
18
import com.stripe.param.v2.core.EventDestinationRetrieveParams;
19
import com.stripe.param.v2.core.EventDestinationUpdateParams;
20

21
public final class EventDestinationService extends ApiService {
22
  public EventDestinationService(StripeResponseGetter responseGetter) {
NEW
23
    super(responseGetter);
×
NEW
24
  }
×
25

26
  /** Create a new event destination. */
27
  public EventDestination create(EventDestinationCreateParams params) throws StripeException {
NEW
28
    return create(params, (RequestOptions) null);
×
29
  }
30
  /** Create a new event destination. */
31
  public EventDestination create(EventDestinationCreateParams params, RequestOptions options)
32
      throws StripeException {
NEW
33
    String path = "/v2/core/event_destinations";
×
NEW
34
    ApiRequest request =
×
35
        new ApiRequest(
36
            BaseAddress.API,
37
            ApiResource.RequestMethod.POST,
38
            path,
NEW
39
            ApiRequestParams.paramsToMap(params),
×
40
            options);
NEW
41
    return this.request(request, EventDestination.class);
×
42
  }
43
  /** Delete an event destination. */
44
  public EventDestination delete(String id) throws StripeException {
NEW
45
    return delete(id, (RequestOptions) null);
×
46
  }
47
  /** Delete an event destination. */
48
  public EventDestination delete(String id, RequestOptions options) throws StripeException {
NEW
49
    String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id));
×
NEW
50
    ApiRequest request =
×
51
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options);
NEW
52
    return this.request(request, EventDestination.class);
×
53
  }
54
  /** Disable an event destination. */
55
  public EventDestination disable(String id) throws StripeException {
NEW
56
    return disable(id, (RequestOptions) null);
×
57
  }
58
  /** Disable an event destination. */
59
  public EventDestination disable(String id, RequestOptions options) throws StripeException {
NEW
60
    String path =
×
NEW
61
        String.format("/v2/core/event_destinations/%s/disable", ApiResource.urlEncodeId(id));
×
NEW
62
    ApiRequest request =
×
63
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options);
NEW
64
    return this.request(request, EventDestination.class);
×
65
  }
66
  /** Enable an event destination. */
67
  public EventDestination enable(String id) throws StripeException {
NEW
68
    return enable(id, (RequestOptions) null);
×
69
  }
70
  /** Enable an event destination. */
71
  public EventDestination enable(String id, RequestOptions options) throws StripeException {
NEW
72
    String path =
×
NEW
73
        String.format("/v2/core/event_destinations/%s/enable", ApiResource.urlEncodeId(id));
×
NEW
74
    ApiRequest request =
×
75
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options);
NEW
76
    return this.request(request, EventDestination.class);
×
77
  }
78
  /** Lists all event destinations. */
79
  public StripeCollection<EventDestination> list(EventDestinationListParams params)
80
      throws StripeException {
NEW
81
    return list(params, (RequestOptions) null);
×
82
  }
83
  /** Lists all event destinations. */
84
  public StripeCollection<EventDestination> list(RequestOptions options) throws StripeException {
NEW
85
    return list((EventDestinationListParams) null, options);
×
86
  }
87
  /** Lists all event destinations. */
88
  public StripeCollection<EventDestination> list() throws StripeException {
NEW
89
    return list((EventDestinationListParams) null, (RequestOptions) null);
×
90
  }
91
  /** Lists all event destinations. */
92
  public StripeCollection<EventDestination> list(
93
      EventDestinationListParams params, RequestOptions options) throws StripeException {
NEW
94
    String path = "/v2/core/event_destinations";
×
NEW
95
    ApiRequest request =
×
96
        new ApiRequest(
97
            BaseAddress.API,
98
            ApiResource.RequestMethod.GET,
99
            path,
NEW
100
            ApiRequestParams.paramsToMap(params),
×
101
            options);
NEW
102
    return this.request(request, new TypeToken<StripeCollection<EventDestination>>() {}.getType());
×
103
  }
104
  /** Send a {@code ping} event to an event destination. */
105
  public Event ping(String id) throws StripeException {
NEW
106
    return ping(id, (RequestOptions) null);
×
107
  }
108
  /** Send a {@code ping} event to an event destination. */
109
  public Event ping(String id, RequestOptions options) throws StripeException {
NEW
110
    String path = String.format("/v2/core/event_destinations/%s/ping", ApiResource.urlEncodeId(id));
×
NEW
111
    ApiRequest request =
×
112
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options);
NEW
113
    return this.request(request, Event.class);
×
114
  }
115
  /** Retrieves the details of an event destination. */
116
  public EventDestination retrieve(String id, EventDestinationRetrieveParams params)
117
      throws StripeException {
NEW
118
    return retrieve(id, params, (RequestOptions) null);
×
119
  }
120
  /** Retrieves the details of an event destination. */
121
  public EventDestination retrieve(String id, RequestOptions options) throws StripeException {
NEW
122
    return retrieve(id, (EventDestinationRetrieveParams) null, options);
×
123
  }
124
  /** Retrieves the details of an event destination. */
125
  public EventDestination retrieve(String id) throws StripeException {
NEW
126
    return retrieve(id, (EventDestinationRetrieveParams) null, (RequestOptions) null);
×
127
  }
128
  /** Retrieves the details of an event destination. */
129
  public EventDestination retrieve(
130
      String id, EventDestinationRetrieveParams params, RequestOptions options)
131
      throws StripeException {
NEW
132
    String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id));
×
NEW
133
    ApiRequest request =
×
134
        new ApiRequest(
135
            BaseAddress.API,
136
            ApiResource.RequestMethod.GET,
137
            path,
NEW
138
            ApiRequestParams.paramsToMap(params),
×
139
            options);
NEW
140
    return this.request(request, EventDestination.class);
×
141
  }
142
  /** Update the details of an event destination. */
143
  public EventDestination update(String id, EventDestinationUpdateParams params)
144
      throws StripeException {
NEW
145
    return update(id, params, (RequestOptions) null);
×
146
  }
147
  /** Update the details of an event destination. */
148
  public EventDestination update(String id, RequestOptions options) throws StripeException {
NEW
149
    return update(id, (EventDestinationUpdateParams) null, options);
×
150
  }
151
  /** Update the details of an event destination. */
152
  public EventDestination update(String id) throws StripeException {
NEW
153
    return update(id, (EventDestinationUpdateParams) null, (RequestOptions) null);
×
154
  }
155
  /** Update the details of an event destination. */
156
  public EventDestination update(
157
      String id, EventDestinationUpdateParams params, RequestOptions options)
158
      throws StripeException {
NEW
159
    String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id));
×
NEW
160
    ApiRequest request =
×
161
        new ApiRequest(
162
            BaseAddress.API,
163
            ApiResource.RequestMethod.POST,
164
            path,
NEW
165
            ApiRequestParams.paramsToMap(params),
×
166
            options);
NEW
167
    return this.request(request, EventDestination.class);
×
168
  }
169
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc