Skip to content

Commit

Permalink
feat: add new is_one_time and is_custom_ammount to `SponsorshipT…
Browse files Browse the repository at this point in the history
…ier` (#431)
  • Loading branch information
octokitbot authored Apr 2, 2021
1 parent 08a1a17 commit aeb2391
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 12 deletions.
8 changes: 6 additions & 2 deletions cache/webhook-events-and-payloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -12447,7 +12447,9 @@ <h4 id="webhook-payload-example-when-someone-creates-a-sponsorship">
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"foo"</span>,
<span class="hljs-attr">"monthly_price_in_cents"</span>: <span class="hljs-number">500</span>,
<span class="hljs-attr">"monthly_price_in_dollars"</span>: <span class="hljs-number">5</span>,
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"$5 a month"</span>
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"$5 a month"</span>,
<span class="hljs-attr">"is_one_time"</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">"is_custom_amount"</span>: <span class="hljs-literal">false</span>
}
},
<span class="hljs-attr">"sender"</span>: {
Expand Down Expand Up @@ -12531,7 +12533,9 @@ <h4 id="webhook-payload-example-when-someone-downgrades-a-sponsorship">
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"foo"</span>,
<span class="hljs-attr">"monthly_price_in_cents"</span>: <span class="hljs-number">500</span>,
<span class="hljs-attr">"monthly_price_in_dollars"</span>: <span class="hljs-number">5</span>,
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"$5 a month"</span>
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"$5 a month"</span>,
<span class="hljs-attr">"is_one_time"</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">"is_custom_amount"</span>: <span class="hljs-literal">false</span>
}
},
<span class="hljs-attr">"changes"</span>: {
Expand Down
20 changes: 15 additions & 5 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -53300,7 +53300,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_amount": false
}
},
"sender": {
Expand Down Expand Up @@ -53376,7 +53378,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_amount": false
}
},
"changes": {
Expand Down Expand Up @@ -53465,7 +53469,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_ammount": false
}
},
"sender": {
Expand Down Expand Up @@ -53541,7 +53547,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_ammount": false
}
},
"changes": {
Expand All @@ -53552,7 +53560,9 @@
"description": "bar",
"monthly_price_in_cents": 1000,
"monthly_price_in_dollars": 10,
"name": "$10 a month"
"name": "$10 a month",
"is_one_time": false,
"is_custom_ammount": false
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_ammount": false
}
},
"sender": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"description": "foo",
"monthly_price_in_cents": 500,
"monthly_price_in_dollars": 5,
"name": "$5 a month"
"name": "$5 a month",
"is_one_time": false,
"is_custom_ammount": false
}
},
"changes": {
Expand All @@ -61,7 +63,9 @@
"description": "bar",
"monthly_price_in_cents": 1000,
"monthly_price_in_dollars": 10,
"name": "$10 a month"
"name": "$10 a month",
"is_one_time": false,
"is_custom_ammount": false
}
}
},
Expand Down
8 changes: 6 additions & 2 deletions payload-schemas/schemas/common/sponsorship-tier.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"description",
"monthly_price_in_cents",
"monthly_price_in_dollars",
"name"
"name",
"is_one_time",
"is_custom_ammount"
],
"type": "object",
"properties": {
Expand All @@ -17,7 +19,9 @@
"description": { "type": "string" },
"monthly_price_in_cents": { "type": "integer" },
"monthly_price_in_dollars": { "type": "integer" },
"name": { "type": "string" }
"name": { "type": "string" },
"is_one_time": { "type": "boolean" },
"is_custom_ammount": { "type": "boolean" }
},
"additionalProperties": false,
"title": "Sponsorship Tier"
Expand Down
2 changes: 2 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5526,6 +5526,8 @@ export interface SponsorshipTier {
monthly_price_in_cents: number;
monthly_price_in_dollars: number;
name: string;
is_one_time: boolean;
is_custom_ammount: boolean;
}
export interface SponsorshipCreatedEvent {
action: "created";
Expand Down

0 comments on commit aeb2391

Please sign in to comment.