File tree Expand file tree Collapse file tree 8 files changed +58
-6
lines changed Expand file tree Collapse file tree 8 files changed +58
-6
lines changed Original file line number Diff line number Diff line change 1- # @install: lix --silent download haxelib: http-status#1.2.2 into http-status/1.2.2/haxelib
2- -D http-status=1.2.2
3- -cp ${HAXESHIM_LIBCACHE}/http-status/1.2.2/haxelib /src
1+ # @install: lix --silent download "https://github.com/kevinresol/ http-status/archive/e1a738c048c47eac396262517e09ad787544ed25.tar.gz" into http-status/1.3.1/github/e1a738c048c47eac396262517e09ad787544ed25
2+ -D http-status=1.3.1
3+ -cp ${HAXESHIM_LIBCACHE}/http-status/1.3.1/github/e1a738c048c47eac396262517e09ad787544ed25 /src
Original file line number Diff line number Diff line change @@ -5,6 +5,5 @@ import stripe.types.*;
55interface ChargeApi {
66
77 @:get (' /' )
8- @:consumes (' application/x-www-form-urlencoded' )
98 public function get (): Charge ;
109}
Original file line number Diff line number Diff line change 1+ package stripe .api ;
2+
3+ import stripe .types .* ;
4+
5+ interface RefundApi {
6+
7+ @:get (' /' )
8+ public function get (): Refund ;
9+ }
Original file line number Diff line number Diff line change 1+ package stripe .api ;
2+
3+ import stripe .types .* ;
4+
5+ interface RefundsApi {
6+
7+ @:sub (' / $id ' )
8+ function ofId (id : String ): RefundApi ;
9+
10+ @:post (' /' )
11+ @:consumes (' application/x-www-form-urlencoded' )
12+ public function create (body : {
13+ charge : String ,
14+ ? amount : Int ,
15+ ? reason : String ,
16+ ? refund_application_fee : Bool ,
17+ ? reverse_transfer : Bool ,
18+ // ?metadata:Metadata, // need support in tink_querystring
19+ }): Refund ;
20+ }
Original file line number Diff line number Diff line change @@ -8,5 +8,8 @@ interface StripeApi {
88 @:sub (' /v1/charges' )
99 var charges : ChargesApi ;
1010
11+ @:sub (' /v1/refund' )
12+ var refund : RefundsApi ;
13+
1114
1215}
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import tink.json.Value;
44
55typedef Charge = {
66 id : String ,
7- object : String ,
7+ // object:String,
88 amount : Int ,
99 amount_refunded : Int ,
1010 ? application : String ,
1111 ? application_fee : String ,
1212 balance_transaction : String ,
1313 captured : Bool ,
1414 created : Timestamp ,
15- currency : String ,
15+ currency : Currency ,
1616 customer : String ,
1717 ? description : String ,
1818 ? destination : String ,
Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ enum Object {
55 @:json ({object : ' card' }) Card (card : Card );
66 @:json ({object : ' subscription_item' }) SubscriptionItem (subscriptionItem : SubscriptionItem );
77 @:json ({object : ' subscription' }) Subscription (subscription : Subscription );
8+ @:json ({object : ' refund' }) Refund (refund : Refund );
9+ @:json ({object : ' charge' }) Charge (charge : Charge );
810}
Original file line number Diff line number Diff line change 1+ package stripe .types ;
2+
3+ import tink .json .Value ;
4+
5+ typedef Refund = {
6+ id : String ,
7+ // object:String,
8+ amount : Int ,
9+ balance_transaction : String ,
10+ charge : String ,
11+ created : Timestamp ,
12+ currency : Currency ,
13+ ? failure_balance_transaction : String ,
14+ ? failure_reason : String ,
15+ metadata : Metadata ,
16+ ? reason : String ,
17+ ? receipt_number : String ,
18+ status : String ,
19+ }
You can’t perform that action at this time.
0 commit comments